The C# snippet given above is incorrect.
The string parameter passed to the LoadControl() method should not be "TempControl_Samples1.ascx.cs" but "TempControlSamples1.ascx"
At runtime the former will throw and InvalidCastException with Message property of --> Unable to cast object of type 'System.Web.Compilation.BuildResultCompiledAssembly' to type 'System.Web.Util.IWebObjectFactory'.
The VB snippet above is incorrect for the same reason AND the code is executed in the Page_Load event handler and not in the Page_Init or OnInit as presented.