I want to display a Javascript dialog box after postback. Then if user clicks "OK", do something. If user clicks "Cancel", do something else.
Plz help.
protected void Page_Load(object sender, EventArgs e)
{
if (IsPostBack)
{
ClientScript.RegisterClientScriptBlock(GetType(), "Javascript",
"<script>window.onload=function(){return confirm('Are you sure?');};</script>");
}
}