Tuesday, 4 November 2014

Close the Page on a Button Click asp.net c#.

If you want to close the window after executing code behind code.


string closeWindowScript = "<script language=javascript>window.top.close();</script>";
if ((!ClientScript.IsStartupScriptRegistered("clientScript"))) {
ClientScript.RegisterStartupScript(Page.GetType(), "clientScript", closeWindowScript);
}

No comments:

Post a Comment