Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Disable asp.net button

Reply
Thread Tools

Disable asp.net button

 
 
Edwin Knoppert
Guest
Posts: n/a
 
      12-12-2006
I'm using a asp.net button for postback purposes.
Since the postback might take some time i would also like to disable this
button.
On reload the button will be enabled again.. fine..

However, i used onclientclick and then the submit is aborted.
So i messed with some ordinary button stuff executing a click() on the
asp.net button.
Isn't there an easier way to disable this asp.net button and still have the
execute?


 
Reply With Quote
 
 
 
 
Mark Rae
Guest
Posts: n/a
 
      12-12-2006
"Edwin Knoppert" <> wrote in message
news:457edac0$0$11825$ ...

> Isn't there an easier way to disable this asp.net button and still have
> the execute?


http://www.google.co.uk/search?sourc...+twice+prevent


 
Reply With Quote
 
 
 
 
Edwin Knoppert
Guest
Posts: n/a
 
      12-12-2006
This also works (good enough for me)

<asp:Button ID="Button1" runat="server" Text="Button"
OnClientClick="setTimeout( 'document.getElementById( \x22' + this.id +
'\x22 ).disabled = true;', 1 );"/>




"Mark Rae" <> schreef in bericht
news:%...
> "Edwin Knoppert" <> wrote in message
> news:457edac0$0$11825$ ...
>
>> Isn't there an easier way to disable this asp.net button and still have
>> the execute?

>
> http://www.google.co.uk/search?sourc...+twice+prevent
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
disable the back button provide the users with my own button to go back. sylvia sil ASP .Net 1 12-29-2004 04:41 PM
If value in name field in top row disable submit button until add button is pressed or field is cleared. Chuck Javascript 0 11-10-2003 02:23 AM
How to disable the default button? cw ASP .Net 2 08-06-2003 11:36 AM
disable or prevent a button with onclick and javascript techfuzz ASP .Net 2 08-04-2003 09:06 AM
back button - disable belgie ASP .Net 4 07-26-2003 06:19 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57