Disable ASP Button in a Datagrid

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

  1. ChrisClayko


    Aug 2, 2006
    Likes Received:
    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

    ChrisClayko, Aug 2, 2006
    1. Advertisements

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.