Loading.gif
< Html Xmlns = "Http://www.w3.org/1999/xhtml" >
< Head ID = "Head1" Runat = "Server" >
< Title > </ Title >
< Style Type = "Text/CSS" >
# Loading
{
Width : 170px ;
Height : 25px ;
Border : 3px solid # c3daf9 ;
Position : Absolute ;
Top : 300px ;
Left : 600px ;
Z-Index : 10000 ;
Background-color : # F7f9fc ;
Line-height : 25px ;
Vertical-align : Middle ;
Font-size : 11pt ;
Display : None ;
}
</ Style >
< Script SRC = "Jquery. js" Type = "Text/JavaScript" > </ Script >
< Script Type = "Text/JavaScript" >
$ ( Function (){
// Init ();
});
Function Init (){
$ ( " # Loading " ). Show ();
SetTimeout (hiddendiv, 5000 );
}
Function Showdiv (){
$ ( " # Loading " ). Show ();
}
Function Hiddendiv (){
$ ( " # Loading " ). Hide ();
}
Function Onclicktest (){
$. Ajax ({
Async: True ,
Beforesend: Function (){
Showdiv ();
},
Complete: Function (){
Hiddendiv ();
},
URL: " Ajax/handler1.ashx " ,
Success: Function (Data ){
Alert ( " Execution successful " );
}
});
}
</ Script >
</ Head >
< Body >
< Form ID = "Form1" Runat = "Server" >
< Div >
< Div ID = "Loading" > < IMG SRC = "Images/loading.gif" ALT = "" /> Loading data. Please wait... </ Div >
< Input Type = "Button" ID = "BTN" Value = "Test" Onclick = "Onclicktest ()" />
</ Div >
</ Form >
</ Body >
</ Html >