Sometimes the javacript file loaded in the header section seem to be unloaded during the page post backs. The trick is to register the file with ClientScriptManager as follows.
protected void Page_Load(object sender, EventArgs e)
{
if(!this.Page.ClientScript.IsClientScriptIncludeRegistered("qry"))
this.Page.ClientScript.RegisterClientScriptInclude("qry", ResolveClientUrl("~/js/YourScript.js"));
}
Regards
Samitha
protected void Page_Load(object sender, EventArgs e)
{
if(!this.Page.ClientScript.IsClientScriptIncludeRegistered("qry"))
this.Page.ClientScript.RegisterClientScriptInclude("qry", ResolveClientUrl("~/js/YourScript.js"));
}
Regards
Samitha
No comments:
Post a Comment