473,387 Members | 3,684 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,387 software developers and data experts.

Set a button as default "enter" input.


Hello,
I have an html submit button wich i have converted into a server
control(ascx) .
I want it serverside click event to be fired on "enter".

How can this be achieved?

Many thanks in advance
JB

Nov 19 '05 #1
3 2342
Take a look at:
http://www.hanselman.com/blog/Commen...f-c243d9d1fdd2
and maybe even
http://www.allasp.net/enterkey.aspx

You'll be glad to know that in ASP.Net 2.0, this gets a lot easier!

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/

"Jensen bredal" <ig******@bredhal.com> wrote in message
news:ut**************@TK2MSFTNGP15.phx.gbl...

Hello,
I have an html submit button wich i have converted into a server
control(ascx) .
I want it serverside click event to be fired on "enter".

How can this be achieved?

Many thanks in advance
JB

Nov 19 '05 #2
In Page_Load (at least generally), do the following:

Page.RegisterHiddenField("__EVENTTARGET", "NameOfDefaultButton")

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************
"Jensen bredal" wrote:

Hello,
I have an html submit button wich i have converted into a server
control(ascx) .
I want it serverside click event to be fired on "enter".

How can this be achieved?

Many thanks in advance
JB

Nov 19 '05 #3
Great,
Many thanks
JB
Nov 19 '05 #4

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

Similar topics

8
by: EBG | last post by:
I have a simple email form on my site but getting screwy results because I know alot of users are hitting "enter" instead of tab when doing the form. When they hit enter the entire form is...
2
by: Cindy | last post by:
Hi all you smarties out there, I'm having a little conundrum with my asp.net page Scenario: I have a form (asp.net) with no code behind (as yet). I have placed a javascript function on a...
2
by: MattB | last post by:
I have a WebForm that has a "reset" button and an "Enter" button. It's a long form, and users tend to hit the enter key at some point when they really want to tab to the next form field. How can I...
2
by: Hoss | last post by:
Hi guys, The framework of my page is an aspx page with a header and a footer. The header is a menu system and depending on what you select there different ascx pages are loaded into the middle...
3
by: aryayudhi | last post by:
I have a html page that has javascript that works perfectly in IE, but not in Firefox. The use of this javascript to change "Tab" to "Enter" Button. When we press Tab, it is like when we press Enter...
0
by: roxanaislam | last post by:
Hi: I have a search form in my application which has 4 dropdown list controls, one text box, one "GO" button, one "reset" button. When the "GO" button is clicked the form gets submitted and the...
4
by: roxanaislam | last post by:
Submitting Form by pressing the "ENTER" key -------------------------------------------------------------------------------- Hi: I have a search form in my application which has 4 dropdown...
1
by: Webmills | last post by:
Hi I have a log out button at the top of my site. It is contained within a web control within the master page. Because it is the first button on the page, then by default it is the one that...
3
by: Simon Verona | last post by:
Sorry for the repost, but this group seems to be more "active" than the group that I posted my question, and it's probably as valid here as there! I have a usercontrol, which contains a textbox...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.