Use this static method to determine whether a ScriptManager control is on a page, or to access the properties and methods of a ScriptManager control when you do not know its ID.
ScriptManager scriptManager;
if (ScriptManager.GetCurrent(Page) == null)
{
scriptManager = new ScriptManager();
scriptManager .ID = "ScriptManager1";
}
else
{
scriptManager = ScriptManager.GetCurrent(Page);
}
No comments:
Post a Comment