|
-
Jul 12th, 2004, 01:33 AM
#1
Thread Starter
Hyperactive Member
Hide page when loading data
Hey,
I got problem described below.
I have buttons, links in my page. Problem is that users press these buttons and before aplication finishes their work, they press button second or third time, which courses errors.
How to make page data disapear (while page is postbacking) when button is clicked (for some pages)
Thanks in advance
-
Jul 12th, 2004, 04:19 AM
#2
Fanatic Member
Why not just disable the button :
myButton.enabled = false
Or do the processing on a seperate page ?
-
Jul 12th, 2004, 04:36 AM
#3
the problem with just disabling the button is that until the page is reloaded after postback the button is still on screen for the user to click over and over again calling the OnClick code everytime. You can either disable the button using Javascript or try something like:
VB Code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
'Test to see if button still processing
If Session("clicked") = False Then
Session("clicked") = True
'Perform Processing here
Session("clicked") = False
End If
End Sub
which might work.
EDIT: If you don't mind using 3rd party controls this one by Andy Smith works very well and is available for free.
Last edited by Fishcake; Jul 12th, 2004 at 04:49 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|