private static void ShowMessage(Page page, string message)Here is how to use:
{
ScriptManager.RegisterClientScriptBlock(page, page.GetType(),
"IncorrectDate", @"<script>alert('" + message + "');</script>", false);
}
protected void btnSave_Click(object sender, EventArgs e)
{
//....
ShowMessage(this, "Success!");
}
PS:Your WebForm must support ASP.Net AJAX (your page must have ScriptManager).
No comments:
Post a Comment