Disable asp.net button

Discussion in 'ASP .Net' started by Edwin Knoppert, Dec 12, 2006.

  1. 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?
     
    Edwin Knoppert, Dec 12, 2006
    #1
    1. Advertising

  2. Edwin Knoppert

    Mark Rae Guest

    Mark Rae, Dec 12, 2006
    #2
    1. Advertising

  3. 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?sour...6-28,GGLG:en&q=asp button click twice prevent
    >
     
    Edwin Knoppert, Dec 12, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Dot net work
    Replies:
    11
    Views:
    13,579
    Dot net work
    May 9, 2004
  2. microsoft
    Replies:
    1
    Views:
    2,579
    bruce barker
    Oct 5, 2004
  3. Ghafran Abbas
    Replies:
    0
    Views:
    4,317
    Ghafran Abbas
    Oct 12, 2004
  4. sylvia sil
    Replies:
    1
    Views:
    657
    Curt_C [MVP]
    Dec 29, 2004
  5. Chuck
    Replies:
    0
    Views:
    297
    Chuck
    Nov 10, 2003
Loading...

Share This Page