Blocking F5-Refresh Key In IE and Firefox Trapping close of IE window in ASP.NET
Aug 11
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Please wait...We Are Processing Your Request..</title>

    <script>
        function PageOnLoad()
        {
            location.href = "<%=PageToLoad%>";
            document.images['imgsrc'].src="Images/Loading.gif";
        }
    </script>

</head>
<body bottommargin="0" leftmargin="0" rightmargin="0"
topmargin="0" onload="PageOnLoad();">
    <form id="form1" runat="server">
    <div>
        <table border="0" cellpadding="0" cellspacing="0" height="100%" width="100%">
            <tr>
                <td height="50" class="NormalText" align=center valign="bottom">
                <h3>We are processing your request. Please wait.. </h3>
                </td>
            </tr>
            <tr>
                <td align="center" height="250" valign="top">
            <img src="" name="imgsrc" /></td>
            </tr>
        </table>
    </div>
    </form>
</body>
</html>

Source Code of code-behind file (PageProcessor.aspx.cs)

protected string PageToLoad;

    protected void Page_Load(object sender, EventArgs e)
    {
        PageToLoad = Request.QueryString["PageId"];
    }

This article has been posted at online dating site architect providing free online dating service.

Leave a Reply