workcontrol wroteCan you elaborate on "Control_Load due to recursion"?
When I converted the code to C# and ran my module in Debug mode the application crashed because there was an infinite loop in the Load_Control method. I did not get time to figure out what was wrong.
private void Control_Load()
{
try
{
if (Request.QueryString[Utility.UrlPageID] != null)
PageId = Int32.Parse(Request.QueryString[Utility.UrlPageID]);
switch (pageId)
{
case (int)Purjosh_Utility.MultipageDesktopType.Control1:
ControlFileName = "Control1.ascx";
ControlPath = "/";
break;
case (int)Utility.MultipageDesktopType.Browse:
ControlFileName = "Browse.ascx";
ControlPath = "/";
break;
}
PageName = DotNetNuke.Common.Globals.ResolveUrl(this.TemplateSourceDirectory + ControlPath + ControlFileName);
DotNetNuke.Entities.Modules.PortalModuleBase objModule = (DotNetNuke.Entities.Modules.PortalModuleBase)this.LoadControl(PageName);
if (objModule != null)
{
objModule.ModuleConfiguration = this.ModuleConfiguration;
objModule.LocalResourceFile = objModule.LocalResourceFile + ControlFileName + ".resx";
plhPlaceHolder.Controls.Add(objModule);
}
}
catch (Exception ex)
{
}
}