Click here to Skip to main content
15,889,879 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am facing the problem when i press the ENTER KEY twice on ok button in modalpopup my data saved twice. So please help me to avoid two time data saving on ENTER KEY press. I want Enter Key Event for Saving data So I did not false the Enter Key Event.


Thank You,
Posted
Comments
Pankaj Nikam 22-Jun-12 3:58am    
Can you please put up the code of the ModalPopup?

1 solution

when your saving process start then disable the button and when data saved than give message that your data has saved than after enable true this button i think after that your problem will solve
look this simple example

C#
protected void Button1_Click(object sender, EventArgs e)
    {
        Button1.Enabled = false;
        saveData();
        Page.ClientScript.RegisterStartupScript(GetType(), "Script1", "alert('Data saved');", true);
        Button1.Enabled = true;
    }
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900