ASP.net avoid going back in browser, and avoid pressing the same button twice

1

I have a problem, many times users press the button twice and that causes data inconsistency, or press one, go back and press the button again, then the key questions are: How to avoid more than one click in a button? How to avoid being able to go back on a web page?

    
asked by RSillerico 14.06.2016 в 00:12
source

1 answer

2

To disable the button you can support yourself from jQuery, a quick example:

$(document).ready(function){
    $('#idBoton').click(function(e){
        e.preventDefault();
        $(this).prop('disabled', true);
    }
}

For your other question you might try to use this:

Page.Response.Cache.SetCacheability(HttpCacheability.NoCache)
    
answered by 14.06.2016 в 01:33