Resources for the DotNetNuke Community
Hello everyone.
I've created a sample module and then define it by host module definition setting.
My Sample module just shows a label with its text.
After that, when I added this module to top pan of the default page, I received this error message:
An error has occurred.DotNetNuke.Services.Exceptions.PageLoadException: Multiple controls with the same ID 'ctr365_DD' were found. FindControl requires that controls have unique IDs. ---> System.Web.HttpException: Multiple controls with the same ID 'ctr365_DD' were found. FindControl requires that controls have unique IDs. at System.Web.UI.Control.FillNamedControlsTable(Control namingContainer, ControlCollection controls) at System.Web.UI.Control.FillNamedControlsTable(Control namingContainer, ControlCollection controls) at System.Web.UI.Control.FindControl(String id, Int32 pathOffset) at System.Web.UI.Control.FindControl(String id) at DotNetNuke.UI.Skins.Skin.Page_Init(Object sender, EventArgs e) at System.Web.UI.Control.OnInit(EventArgs e) at System.Web.UI.UserControl.OnInit(EventArgs e) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.AddedControl(Control control, Int32 index) at System.Web.UI.ControlCollection.Add(Control child) at DotNetNuke.Framework.CDefault.Page_Init(Object sender, EventArgs e) at System.Web.UI.Control.OnInit(EventArgs e) at DotNetNuke.Framework.PageBase.OnInit(EventArgs e) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Page.ProcessRequestMain() --- End of inner exception stack trace ---
I couldn't understand what does it mean? And how can I resolve this?
It would be truly appreciated if any one could give me his opinion to solve this problem.
Thanks Indeed.
This problem has to do with the controls in the module definition. When you add controls to the module definition, each control must have a unique key value. The HelloWorld tutorial doesn't really explain this completely. Edit the HelloWorld module definition. If you followed the tutorial, you should have 3 controls in the module. Edit each control and make sure each one has a unique key value (this is the 3rd text box when editing the control).
Hope this information helps.