473,382 Members | 1,404 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Default button per textbox

Howdy,

I'm liking the new Page.Form.DefaultButton to control the Enter Key action
of the form, but I need to specify it per text box instead of the entire
form. For example, I have a master page with a user control at the top which
contains a text box and a search button. It has a user control on the left
that has the email field and submit button then there is the content body in
the middle that contains the product information and adding the product to
the cart. If I enter a value into the search text box at the top and press
enter, the product is added to the cart. how do I resolve this? am I stuck
using javascript? if so, what's the code for that.

thanks,

--
David Lozzi
dlozzi@(remove)delphi-ts.com
www.delphi-ts.com
Jul 19 '06 #1
1 1169
You could use this free control to solve the problem.
http://www.metabuilders.com/tools/DefaultButtons.aspx

And here's a good article on the subject:
http://www.allasp.net/enterkey.aspx

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
"David Lozzi" <dl****@nospam.nospamwrote in message
news:OR**************@TK2MSFTNGP04.phx.gbl...
Howdy,

I'm liking the new Page.Form.DefaultButton to control the Enter Key action
of the form, but I need to specify it per text box instead of the entire
form. For example, I have a master page with a user control at the top
which contains a text box and a search button. It has a user control on
the left that has the email field and submit button then there is the
content body in the middle that contains the product information and
adding the product to the cart. If I enter a value into the search text
box at the top and press enter, the product is added to the cart. how do I
resolve this? am I stuck using javascript? if so, what's the code for
that.

thanks,

--
David Lozzi
dlozzi@(remove)delphi-ts.com
www.delphi-ts.com

Jul 19 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Ollie | last post by:
When a form has a default button (Form.AcceptButton) and\or a shortcut key for that button (e.g. "&Process") and this button happens to close the form when clicked. Why does the control that...
4
by: RA | last post by:
Hi I have asp.net web app. When a user clicks the enter key when he is viewing the aspx web form, it jumps to the starting web form. How can I handle the user hitting the enter key and to...
3
by: A.M | last post by:
Hi, How can I have an asp.net button as default button? Thanks, Alan
2
by: Ford Desperado | last post by:
Hi, I have a ASP.Net page with several asp:textbox controls and 3 asp:button's I want to specify 1 of these buttons as the default one, so that whenever a user presses 'Enter' while a textbox...
4
by: tshad | last post by:
I have 3 objects on my page (textbox,button and linkbutton) When I put something in my textbox and hit "enter", the page gets posted, but nothing happens. I don't go to either of the functions...
2
by: jonefer | last post by:
This is quite serious - for a beginner... No property setting for a default button? I just want a button on a search page to automatically be pressed when I hit the return/enter key. Somehow I...
1
by: MattB | last post by:
I have some pages that have one or more WebUserControls on them. I want to have a button that is not on a WebUserControl to be the default button when enter is pressed. I've tried just adding:...
0
by: MatsL | last post by:
If I create a simple form with a panel a textbox and button and a RequiredFieldValidator for the textbox. I define the default button on the panel. When i open the form and press enter i get a...
0
by: MatsL | last post by:
I have a simple test form with a panel and default button defined, textbox, RequiredFieldValidator. If i open the form and press enter the RequiredFieldValidator will prevent the form to be...
0
by: thersitz | last post by:
Hi, Using aspnet3.5,VStudio 2008, VB 1.) I have a set of pages, with a search text box button within a userControl that searches across our websites and is registered in a masterpage. 2)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.