Disable ASP Button in a Datagrid

Discussion in 'General Computer Support' started by ChrisClayko, Aug 2, 2006.

  1. ChrisClayko

    ChrisClayko

    Joined:
    Aug 2, 2006
    Messages:
    1
    Hi all,

    I am trying to restrict users from clicking on a submit button more then once in a datagrid. I have found code on the internet which disables a button with post back, so once it is clicked, it is disabled and an event postback is sent to fire off the remaining processes.

    The code i tried this with is (put in the OnInit section):
    aButton.Attributes.Add("onclick","javascript:this.disabled=true;" + this.GetPostBackEventReference(aButton));
    Which works fine with a button...

    When i try to implement this into a Datagrid, the closest result i have achieved is to have the whole datagrid disabled but then the processes wont fire off...

    Please help if you can...

    Thanks in advance Code Gurus

    Chris
     
    ChrisClayko, Aug 2, 2006
    #1
    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. mark  mandel

    Start button Right button strange

    mark mandel, Aug 10, 2004, in forum: Computer Support
    Replies:
    1
    Views:
    502
  2. vinodkumarmyakala
    Replies:
    1
    Views:
    2,980
    vinodkumarmyakala
    Nov 14, 2006
  3. smi59550
    Replies:
    0
    Views:
    1,555
    smi59550
    Jan 18, 2008
  4. smi59550
    Replies:
    0
    Views:
    6,110
    smi59550
    Jan 18, 2008
  5. Amol
    Replies:
    1
    Views:
    322
Loading...

Share This Page