Wednesday, January 23, 2008

Page Log Image & 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)



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


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"
h3We are processing your request. Please wait.. h3
td
tr
tr
td align="center" height="250" valign="top
img src="" name="imgsrc" td
tr
tab le
di v




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

protected string PageToLoad;

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

No comments: