Skip to main content

Sample source code for JavaScript Page Processing

We have provided below sample source code for JavaScript Page Processing in Asp.Net. You can copy and paste it in your pages to create the sample application. Code for Processing Page (PageProcessor.aspx)
<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"];
    }

Comments

Popular posts from this blog