You access the scriptManager from a content page using the static GetCurrent method:
ScriptManager scriptManager = ScriptManager.GetCurrent(this.Page);
Also we can use Type casting..
if (((MasterPage)Master).FindControl("ScriptManager1") != null)
{
ScriptManager scm;
scm = (ScriptManager)((MasterPage)Master).FindControl("ScriptManager1");
scm.SetFocus(txtHdrDet_CMNumber);
}
No comments:
Post a Comment