ASP. NET makes a simple wait window, asp.net wait window

Source: Internet
Author: User

ASP. NET makes a simple wait window, asp.net wait window

When a project was created for a while, it took a long time to process the report. The customer proposed to make a wait window prompting the user to wait (the page was not reflected for too long, and the user thought it was dead ). After analyzing this requirement, I felt that it would be too difficult to implement processbar IN A winform application. Finally, I had to simulate a "fake" Wait form. Fortunately, the customer was quite satisfied.

This wait form is actually completed using the <object> tag. Because the dynamic effect is completed by <marquee>, when the form is displayed, the entire table is transparent, and only the intermediate process bar is moving. No button can be clicked at the end.

First, create a static page: downloadExcel.html

<! --. Tborder {BORDER-RIGHT: #333333 2px solid; BORDER-TOP: #333333 2px solid; BORDER-LEFT: #333333 2px solid; BORDER-BOTTOM: #333333 2px solid; border-collapse: collapse ;}. tborder1 {BORDER-RIGHT: # cccccc 3px solid; BORDER-BOTTOM: # cccccc 3px solid; border-collapse: collapse ;}. dropShadow {filter: dropshadow (color = # a9a9a9, offx = 2, offy = 2, positive = true)} -->

Generating the report. Please wait...
 
               
 

Then add the following paragraph to the processing screen:

<TABLE border = "0" id = "processBarMask" bgcolor = "# cccccc" style = "VISIBILITY: hidden; POSITION: absolute" cellspacing = "0" cellpadding = "0">
<TR>
<TD align = "center">
<Object type = "text/x-scriptlet" id = "objProcessBar" style = "z-index: 65535; "width =" 302 "height =" 102 "data =" downloadExcel.html "> </object>
</TD>
</TR>
</TABLE>

It is hidden from the beginning. After you click the processing button, it is displayed as follows:

<SCRIPT language = "javaScript">
Var firstFlg = "0 ";

Function processStart (){
With (document. all. processBarMask. style ){
Top = 0;
Width = "100% ";
Height = "100% ";
Visibility = "visible ";
}
Document. all. processBarMask. focus ();
}

Function processEnd (){
Document. all. processBarMask. style. visibility = "hidden ";
}
</SCRIPT>

Add processing to the processing button:

<Input type = "button" id = "btnOK" value = "OK" onclick = "processStart ()" style = "width: 80px">


ASP job: Use ASPNET to create a simple WEB page

This job is easy. You can create three new pages, and then associate the pages with one master page and two content pages by passing values between pages, hi if you really need it.

Eager to use ASPnet for a simple website

This item is very valuable. It seems that no one will give it to you. Please look for the source code website!
 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.