There is a problem if we use updatepanel. Therefore, we need to add javascript from the server side every time the page loads. You can do this by adding all your javascript codes to a string variable and adding it with ScriptManager.RegisterStartupScript(this, this.GetType(), "validation", script, false);Go to http://msdn.microsoft.com/en-us/library/system.web.ui.scriptmanager.registerstartupscript.aspx/ ", to get more information about the function and its arguments.
You can make such a function
private void addScript()
{
string script = @"<script type=""text/javascript"" language=""javascript"">
javascript function including jquery
</script>";
ScriptManager.RegisterStartupScript(this, this.GetType(), "validation", script, false);
}
All javascript function will be added to the string script. Call the function in pageload. Thus, it will be added to the page again. I think this will solve the problem.
source
share