|
-
Feb 3rd, 2004, 06:12 AM
#1
Thread Starter
Fanatic Member
default button
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
-
Feb 3rd, 2004, 01:09 PM
#2
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.
-
May 31st, 2007, 03:56 PM
#3
Fanatic Member
Re: default button
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?
-
Jun 1st, 2007, 08:39 AM
#4
Re: default button
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.
-
Jun 1st, 2007, 09:47 AM
#5
Addicted Member
Re: default button
in the page load event:
Page.Form.DefaultButton = btnSend.UniqueID;
-
Jun 1st, 2007, 03:09 PM
#6
Hyperactive Member
Re: default button
if you are using 2005 you can also set it right in your form tag like so:
<form id="form1" runat="server" DefaultButton="SearchButton">
If this post helps, please RATE MY POST!
Using Visual Studio 2005 SE
-
Jun 1st, 2007, 07:02 PM
#7
Fanatic Member
Re: default button
I will have to try the code 24sharon has provided in 1.1 and see if that works.
-
Jun 3rd, 2007, 04:56 PM
#8
Re: default button
 Originally Posted by lleemon
I will have to try the code 24sharon has provided in 1.1 and see if that works.
Alas that is 2.0 too.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|