Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDevelopment and...Development and...DNN Platform (o...DNN Platform (o...Continuous loop on first startupContinuous loop on first startup
Previous
 
Next
New Post
11/7/2008 7:15 AM
 

I'm developming a module using VS 2008 and everytime I go to launch the Debug, my module causes the site to go into a never ending loop of reloading the module until it crashes. If I cause a/n error to occur in my module by hiding a file, it is set to handle it, and after it catches that error and I unhide the file everything on the site works fine..including my module. The problem lies only when initially starting up the site.

Anyone ever run into a problem like this?

At the moment all my module is doing is allowing the user to choose a display option, and the module then loads a seperate User Control inside of itself.

 
New Post
11/13/2008 8:49 AM
 

Infurno,

Need to see the code your module is running on load to help....

 

Steve

 
New Post
11/13/2008 5:03 PM
 

Well to start some clarification on the problem. The problem only occurs when I am launching a webpage using the debug mode in VS2008. Once the site is up and running, I do not get a problem. Both controls: The main one, and the one being loaded by that one, work fine independantly. The problem only occurs when the 1st control goes to load the 2nd control.

1st Control:
partial class PublishCustomView : ModuleBase, IActionable
{
override protected void OnInit(EventArgs e)
{
base.OnInit(e);
ReadItemType();
LoadControlType();
}

private void LoadControlType()
{
ModuleBase mb = (ModuleBase)LoadControl(controlToLoad);
mb.ModuleConfiguration = ModuleConfiguration;
mb.ID = System.IO.Path.GetFileNameWithoutExtension(controlToLoad);
phControls.Controls.Add(mb);
}
}

Notes: ReadItemType(); simply sets the string controlToLoad.

2nd Control:
public partial class DetailedFirstItemList : ModuleBase
{
override protected void OnInit(EventArgs e)
{
InitializeComponent();
}

private void InitializeComponent()
{
this.Load += this.Page_Load;
this.PreRender += this.Page_PreRender;
}

private void Page_Load(object sender, EventArgs e)
{
}

private void Page_PreRender(object sender, EventArgs e)
{}
}

Notes: Yes I know these methods are blank, there is nothing in them yet, because It doesn't even work with a simple static label control. And ModuleBase is just a class that inherits PortalModuleBase

From what I can tell everything is working the way its suppose to, except that it just keeps running through everything starting from the OnInit. And individually they both work, without loading another control.

 
New Post
11/13/2008 9:33 PM
 

Well I should have said - "I may be able to help, if I see your code." 

My experience with loading dynamic controls is after the page init and I have never had the need to add code to InitializeComponent. 

Also not being a C# developer I am assuming that this code:

this.Load += this.Page_Load;
this.PreRender += this.Page_PreRender;

- is wiring event handlers. - Have you tried running it w/o this code?

Hopefully posting your code helps someone else answer your question better....

 
Previous
 
Next
HomeHomeDevelopment and...Development and...DNN Platform (o...DNN Platform (o...Continuous loop on first startupContinuous loop on first startup


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out