Hi,
When i am in a text box in my webform and i press enter i want it to be the same as clicking the search button. Does anybody know how to set what the default button is?
Cheers
Nick
Printable View
Hi,
When i am in a text box in my webform and i press enter i want it to be the same as clicking the search button. Does anybody know how to set what the default button is?
Cheers
Nick
Hi,
I'm not sure if you're interested in using 3rd Party controls but i've used another of their controls and had no problems with it.
A control is available for assigning default buttons to various controls have a look at Metabuilders if you're interested.
I am using .net 1.1 and wondering if there are any other solution then Metabuilders. Trying to stay away from javascript, or is that the only option other then moving to the 2.0 framework?
You could run with trapping which key was pressed in the text box... not sure how that works with web pages, though. The 2.0 solution is a panel with the default button defined as your search button. I don't know if 1.1 supported that, but it might be worth looking into.
in the page load event:
Page.Form.DefaultButton = btnSend.UniqueID;
if you are using 2005 you can also set it right in your form tag like so:
<form id="form1" runat="server" DefaultButton="SearchButton">
I will have to try the code 24sharon has provided in 1.1 and see if that works.
Alas that is 2.0 too.Quote:
Originally Posted by lleemon