Submit buttons enter key issue
-
Hi, I have an imagebutton and a submit button in my usercontrol. I have few textboxes to enter search criteria. Imagebutton placed before the submit button on the design code. When the user press "enter" key imagebutton's click event is firing, but I want the submit button't click event to get fired. Both are running at server. Both actions pulling data from the database. Ram
-
Hi, I have an imagebutton and a submit button in my usercontrol. I have few textboxes to enter search criteria. Imagebutton placed before the submit button on the design code. When the user press "enter" key imagebutton's click event is firing, but I want the submit button't click event to get fired. Both are running at server. Both actions pulling data from the database. Ram
-
Hi, I have an imagebutton and a submit button in my usercontrol. I have few textboxes to enter search criteria. Imagebutton placed before the submit button on the design code. When the user press "enter" key imagebutton's click event is firing, but I want the submit button't click event to get fired. Both are running at server. Both actions pulling data from the database. Ram
Try this link:- http://www.syncfusion.com/faq/aspnet/Search/318.aspx[^] :) Thanks & regards, Suresh Dayma
Everything Is Possible!
-
Here by default imagebutton(whichever will come first) will get fired if you want other button to get fired then you have to use javascript for that.
Best Regards, Apurva Kaushal
I tried all possibities of scripting, could you send something.
-
I tried all possibities of scripting, could you send something.
Two possibilities are there, first you place the control(whose event you want to get fired on enter key) before the other. The second possibility is to use javascript code that will trap the enter key and fire the event. The javascript function to trap the enter key is this:
function TrapEnterKey(field,event) { var keyCode = event.keyCode?event.keyCode:event.which?event.which:event.charcode if(keyCode==13) { document.getElementById("BtnSearch").click(); return false; } }
Best Regards, Apurva Kaushal