1st option
ClientScript.RegisterClientScriptBlock(Page, typeof"Validate(ID), true);
OR
<asp:Button OnClientClick = "Validate(ID)"/>
Use this on page load:
RegisterStartupScript("Unique key", "Validate(ID);");
2nd option
protected void MyButton_Click(object sender, EventArgs e)
{
Page.ClientScript.RegisterStartupScript(this.GetType(), "myScript", "AnotherFunction();", true);
}
ClientScript.RegisterClientScriptBlock(Page, typeof"Validate(ID), true);
OR
<asp:Button OnClientClick = "Validate(ID)"/>
Use this on page load:
RegisterStartupScript("Unique key", "Validate(ID);");
2nd option
protected void MyButton_Click(object sender, EventArgs e)
{
Page.ClientScript.RegisterStartupScript(this.GetType(), "myScript", "AnotherFunction();", true);
}
No comments:
Post a Comment