facing issue in loading custom usercontrol under custom menu user control
-
Thursday, June 14, 2012 6:57 AM
Hi,
I am facing issue in loading custom user control (child control which has text box and dropdown control) which will be placed inside custom mega menu control (Parent control).
Detail: I have developed a custom user control, it has a dropdown list which is getting loaded from an external source using webservice. I have place this user control under a custom mega menu control. On mouse hover on mega menu a slider will open which should contain this dropdown list (child user control). On selection of any value in dropdown list it redirects to any specific page. This custom mega menu navigation is created at the time of page load. Navigation html is being fetched from list at the page load event in megamenu user control. So i mentioned my child user control's html tag (div) in the navigation list. I tried 2 ways
- registered my custom user control (child control) in master page and trying to load it.
- registered my custom control in mega menu user control (parent control) and trying to load it.
In both the above mentioned case my child control is not getting load, irrespective of mega menu control getting loaded. I can see my child control's div tag being available in view source of any page but the control is not getting displayed.
I am stuck with this since last 2 days. Any help will be appreciated.
Thanks,
Manish Jha
All Replies
-
Wednesday, June 20, 2012 7:06 AMModerator
Hi ManishJha,
Please try register your user control in web.config and dynamically load it, or programming add the child user control into the parent control. For more information, please check out the following links:
http://stackoverflow.com/questions/5312030/how-to-add-a-usercontrol-dynamically-without-using-register-or-refere
http://weblogs.asp.net/scottgu/archive/2006/11/26/tip-trick-how-to-register-user-controls-and-custom-controls-in-web-config.aspx
Thanks,
Lhan Han- Marked As Answer by Lhan HanModerator Monday, June 25, 2012 1:58 AM
-
Tuesday, June 26, 2012 5:20 AM
I have tired both these methods but nothing worked. So finally added those inside the parent control itself inspite of going to parent and child user control.
Thanks for your reply

