Click here to Skip to main content
15,921,841 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all,

I have an issue with updating a record on 'Enter Key' press in GridView.

I do my update action with a textbox's onkeyPress event, through JavaScript. The problem comes when I place a new server control button on the same page, and then the Enter Key press event performs differently.

It first goes to the JS code and then it performs the button click event, which I don't want to excute at that time.

Please help me.

Thank you.

Regards,
Prathamesh
Posted
Updated 22-Feb-10 4:19am
v2

1 solution

The button is acting as the default action for that page. Set UseSubmitBehavior=false or use an input element rather than an ASP.NET button
 
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