Friday, January 14, 2011

Display Loading Image in Asp.net

To display loading image we shall use following JavaScript. There are many ways to display loading, but I feel this is the simple to use and implement. We just need one div tag with position set to absolute, and put loading image inside the div tag. Check out following code.

Loading...

(Make sure you set z-index if required.)
In above I have just used text "Loading...", instead of this you can put loading images.Put this div tag as first element of FORM tag. And after above div tag immediately put following JavaScript 



And call function "init()", on "onload" event of body tag.

Done, now as your page loads you can see "Loading..."...
Submit this story to DotNetKicks

0 comments: