how to show alert message
Response.Write("<script language='javascript'>alert('Your Message!')</script>");
OR
string script = "<script language='javascript'>alert('Your Message!');</script>";
ClientScript.RegisterStartupScript(typeof(Page), "Message", script);
OR
Call function when page is load
Page.RegisterStartupScript("onload", "<script language='javascript' type='text/javascript'>functionname();</script>");
OR
<script language='javascript' type='text/javascript'>
function ShowAlert() {
alert('Your Message!');
return false;
}
</script>
<a href="#" onclick="javascript:ShowAlert();">ShowAlert</a>
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.