Hi
every one.
I have a usercontrol and i populate it in modalpoup. which contains Save button and this button validates the all controls .if i click on save button it should save the record in the DB.But i have a problem here , i am able to click the save button more than once this time duplicate records are inserted. can any one help me how to prevent the double clicking of the Button.
Help me plz
Loading

Naresh Babu GopavaramPosted Mar 20, 2012, 9:55 AM
SenthilkumarPosted Mar 20, 2012, 9:41 AM
When click on button, you have to disable the control.
in JavaScript, you have to write the following:
function SubmitResult()
{
document.getElementById('btnSubmit ').disabled = true;
__doPostBack('btnSubmit','click');
}
It will identify the click event of the server side.
protected void btnSubmit_Click(object sender, eventargs e)
{
}
Naresh Babu GopavaramPosted Mar 20, 2012, 9:28 AM
Suthish NairPosted Mar 20, 2012, 9:24 AM
Disable a submit button during Post Backs