In this Tutorial we are working with multiple Image Loading using UpdateProgress and UpdatePanel. We are Showing Loading Images using UpdateProgress tag on Button Click which is in UpdatePanel.
For downloading GIF Loading images Click Here
UpdateProgress : Provides visual feedback in the browser when the content of UpdatePanel controls is updated.
UpdatePanel : Specifies parts of a Web page that can participate in partial-page updates.
ScriptManager : Manages partial-page rendering. The ScriptManager
control registers script components to send to the browser and
overrides page rendering so that only specified regions of the page are
rendered.
One UpdateProgress control on the page can show a progress message for all UpdatePanel controls on the page. Asynchronous postbacks originating inside an UpdatePanel control cause the UpdateProgress control to display its message. Postbacks from controls that are triggers for the panel also display the message.
progress.aspx page code:
Click on Image to Enlarge |
progress.aspx.cs page code:
Click on Image to Enlarge |
Here i have used Thread.Sleep() function for delay in postback so that progress view can be clearly seen.
void Thread.Sleep ( int millisecondsTimeout )
The number of milliseconds for which the thread is blocked. Specify zero(0) to indicate that this thread should be suspected to allow other waiting threads to execute. Specify System.Threading.Timeout.Infinite to block the thread indefinitely.
View in Browser:
No comments:
Post a Comment