I have a MasterPage setup in a Web Application.
Based on different button clicks i load dynamically different usercontrols in a contentplaceholder.
ContentPlaceHolder cph = this.FindControl("ContentPlaceHolder1") as ContentPlaceHolder;
UserControl uc = this.LoadControl("~/UserControls/" + strName + ".ascx") as UserControl;
if ((cph != null) && (uc != null))
uc.ID = strName;
IsControlAdded = true;
ViewState[IDS_USERCONTROL] = strName;
The problem is that i need in Site.Master to use some js code that exists in a dynamically loaded usercontrol.
That seems to be no problem for the first loaded usercontrol because the usercontrols html is included in the master page html.
The problem arrises when i dynimically load the second usercontrol i find out that the html and js from the first usercontrol loaded persists in the master page and the second usercontrol's js and html is not loaded.
If i add EnableAJAX="false" to the radajaxmanager it solves my problem .. but then again .. that beats the purpose of using ajaxmanager.
arr = GetSelectedPerson();
arr = GetSelectedGroups();
This is a code snipplet from Site.Master
are two js methods that exist in different usercontrols.