I'm having two table and both table containing a save button when i enter text in textboxes and press enter then save button of particular table should be called.
remember save button is in after a cancel button..
I'm uploading my text please help me..
remember save button is in after a cancel button..
I'm uploading my text please help me..
First Name | |
Last Name | |
Address | |
OnClick="btnSave_Click" /> | |
College Id | |
College Name | |
Thanx A lot in advance
Pradeep Patel 8483094947


Jaganathan BantheswaranRank #170 · 14.1K reputationPosted Dec 18, 2013, 8:47 PM EST
If you are using Form with submit [save] button, then the Enter key is handled by the form & save button even will be fired & form will be submitted automatically when you hit ENTER on textbox.
If you dont use Form,
Then you need to handle it manually.
Check this link for both example
Pradeep Patel46 reputationPosted Dec 19, 2013, 7:20 PM EST
It works Prefect
Write this line at the Page_Load event of asp.net page, btnSubmit is A name of your control on which you want to set default focus.
this.Form.DefaultButton = this.btnsubmit.UniqueID;
Thanx To MySelf