Thursday, 8 November 2012

Close window without prompt

Code for aspx file

Give id to the body tag and make it runat= server.
<body id="Body" runat ="server" >

Code for aspx.cs file

Body.Attributes.Add("onload", "javascript:window.open('','_self','');window.close();");

No comments:

Post a Comment