Hi,
Based on your example.. of dynamically loading UserControls:
if (LatestLoadedControlName == "~/Forms/LoginAuth/LoginCS.ascx")
{
//Ajaxify the DropDownList in the UserControl itself
//Get the WebUserControl
UserControl MyControl = (UserControl)Page.FindControl(LatestLoadedControlName);
/Get user control's button and label
DropDownList MyDDL = (DropDownList)MyControl.FindControl("DropDownList1");
Button LoginBtn = (Button)MyControl.FindControl("btnLogin");
//Add the necessary AJAX setting programmatically
RadAjaxManager1.AjaxSettings.AddAjaxSetting(MyDDL, null);
}
My Dynamically loaded UserControl Loads ok, ..but when trying to find it...i.e.
1) Page.FindControl("~/Forms/LoginAuth/LoginCS.ascx")
2) Page.FindControl("~/Forms/LoginAuth/LoginCS")
3) Page.FindControl("LoginCS.ascx")
4) Page.FindControl("LoginCS")
MyControl = null (Your example..makes no use of folders,..guess thats the issue,...???)
I tried dragging the Login uCtl onto the main form,..and still Page.FindControl can't find it.
and the Page.Forms coll when in debug, shows 1 entry, and that being it's form.
TIA
Neal