ASP.NET 101 - How to prevent double-clicking on a submit button?

2010-07-29 Thread Dylan Tusler
-- We've got an Ajax-ified multi-page form and I want to prevent double-clicking on the final page's Submit button. My first thought is just to disable the button in its on_Click event handler. Is this a suitable approach? I've looked around a little, trying to see what is the best approach to

Re: ASP.NET 101 - How to prevent double-clicking on a submit button?

2010-07-29 Thread Grant Maw
We've always done it by using javascript, and disabling the button as you've described. HTH Grant On 30 July 2010 08:37, Dylan Tusler dylan.tus...@sunshinecoast.qld.gov.auwrote: __ [image: Sunshine Coast Regional Council]http://www.sunshinecoast.qld.gov.au/ We've got an Ajax-ified

Re: ASP.NET 101 - How to prevent double-clicking on a submit button?

2010-07-29 Thread David Connors
On 30 July 2010 08:37, Dylan Tusler dylan.tus...@sunshinecoast.qld.gov.auwrote: We've got an Ajax-ified multi-page form and I want to prevent double-clicking on the final page's Submit button. My first thought is just to disable the button in its on_Click event handler. Is this a suitable

Re: ASP.NET 101 - How to prevent double-clicking on a submit button?

2010-07-29 Thread David Connors
On 30 July 2010 08:54, Dylan Tusler dylan.tus...@sunshinecoast.qld.gov.auwrote: At first I thought you were pulling a Friday funny on me. I get that a lot. :) But I do see your point, having properly read your post now. I don't get that a lot. I think, in our case, the web form is a

Re: ASP.NET 101 - How to prevent double-clicking on a submit button?

2010-07-29 Thread Michael Minutillo
If you're using jquery you can drop this in a master page: $(document).ready(function() { $('form').submit(function(e) { $(e.target).find('input[type=submit]').attr('disabled', 'true'); } }); Now any form that gets submitted, it's submit button will get disabled immediately. We use a