Saturday, March 24, 2012

wait cursor on click event

hi,

this is the pseudocode for my (asp.net, vb as code-behind) application:

Protected Sub Button_download_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button_download.Click

'|||||||||Code for Downloading a records||||||||||||||||

Response.Redirect("download_report.aspx")

End Sub

Since I have 5000 records in the database, it took a while before the next page is loaded.

So, I wanted to make the pointer a wait cursor to inform the user that the application is still processing.

How can I do that?

I tried adding this code on the first part of the onclick event but nothing happens...

Button_download.Attributes.Add("onclick", "document.body.style.cursor = 'wait';")

Any suggestions?

Thanks!

Sheila

I will use an image rather than adding style. Let's say you have an image of Wait Cursor. Here is the pseudocode to proceed:

By default, image will be visible false.

On button click, please make image's visible = true;

When your data will be bind (let say gridview), in the very next line, you can make image's visible = false.

If solved, Please mark this post as resolved else Let me know

0 comments:

Post a Comment