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

Pradeep PatelPosted Dec 20, 2013, 12:20 AM
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
Jaganathan BantheswaranPosted Dec 19, 2013, 1:47 AM
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