473,387 Members | 1,520 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.

Multiple buttons from different ASP.NET controls

Hi

I have a web form that includes mutiple controls, each of which has its own submit button. Problem is, when I hit "enter" in any of the form fields, irregardless of which component it comes from, the first form button is ALWAYS activated

is there a way to control which form button has "precedence" on a WebForm page using server-side forms? Check it out at http://www.accessquery.com - go to the job search area, enter in your keywords and hit enter - it takes you to the websearch page b/c that form and button occur at the top of the index page and hence get priority. It SHOULD take you to the job search results page

I tried setting the tab index of that top image button to be 99, but that didn't have any affect. I also tried setting the focus on that button via javascript, but that only sometimes works (very weird

Thanks

-- Jak
Nov 18 '05 #1
2 1071
There use to be a good description at this URL, but it doesn't seem to be
functioning.
http://www.kamp-hansen.dk/pages/show...d=21&menuid=20
(if you get into that above URL, please e-mail the page! (IE save as *.html,
then ship it to me)

These guys seem to have a better page, I think the javascript looks the
same:
http://www.allasp.net/enterkey.aspx

--
Mike Mayer - Visual C# MVP
http://www.mag37.com/csharp/
mi**@mag37.com
"Jacob Anderson" <an*******@discussions.microsoft.com> wrote in message
news:97**********************************@microsof t.com...
Hi,

I have a web form that includes mutiple controls, each of which has its own submit button. Problem is, when I hit "enter" in any of the form
fields, irregardless of which component it comes from, the first form button
is ALWAYS activated.
is there a way to control which form button has "precedence" on a WebForm page using server-side forms? Check it out at http://www.accessquery.com -
go to the job search area, enter in your keywords and hit enter - it takes
you to the websearch page b/c that form and button occur at the top of the
index page and hence get priority. It SHOULD take you to the job search
results page.
I tried setting the tab index of that top image button to be 99, but that didn't have any affect. I also tried setting the focus on that button via
javascript, but that only sometimes works (very weird)
Thanks!

-- Jake

Nov 18 '05 #2
Ahh, found it on archive.org, but my internet connection seems to be wacko.
http://web.archive.org/web/200306201...d=21&menuid=20

And made my own copy here:
http://www.mag37.com/csharp/articles...mitButton.html

--
Mike Mayer - Visual C# MVP
http://www.mag37.com/csharp/
mi**@mag37.com

"Michael Mayer [C# MVP]" <mi**@mag37.com> wrote in message
news:ur**************@TK2MSFTNGP11.phx.gbl...
There use to be a good description at this URL, but it doesn't seem to be
functioning.
http://www.kamp-hansen.dk/pages/show...d=21&menuid=20
(if you get into that above URL, please e-mail the page! (IE save as *.html, then ship it to me)

These guys seem to have a better page, I think the javascript looks the
same:
http://www.allasp.net/enterkey.aspx

--
Mike Mayer - Visual C# MVP
http://www.mag37.com/csharp/
mi**@mag37.com
"Jacob Anderson" <an*******@discussions.microsoft.com> wrote in message
news:97**********************************@microsof t.com...
Hi,

I have a web form that includes mutiple controls, each of which has its own submit button. Problem is, when I hit "enter" in any of the form
fields, irregardless of which component it comes from, the first form

button is ALWAYS activated.

is there a way to control which form button has "precedence" on a
WebForm page using server-side forms? Check it out at http://www.accessquery.com - go to the job search area, enter in your keywords and hit enter - it takes
you to the websearch page b/c that form and button occur at the top of the
index page and hence get priority. It SHOULD take you to the job search
results page.

I tried setting the tab index of that top image button to be 99, but
that didn't have any affect. I also tried setting the focus on that button via
javascript, but that only sometimes works (very weird)

Thanks!

-- Jake


Nov 18 '05 #3

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

Similar topics

3
by: rachel | last post by:
Hi all, I am new in ASP.Net. I have a question on link multiple web forms together. Here is the scenario: I create an Index.aspx WebForm which consists of a banner and three navigator...
1
by: .Net Newbie | last post by:
I am relatively new to .Net and have been coding an intranet site for my employer for a couple of months. I am currently stuck coding in a text-editor called EditPlus without access to the VS.Net...
2
by: Keith Smith | last post by:
Is there a way to attach event handler code to multiple controls?
0
by: joe | last post by:
Hi, I have an aspx page that reads a session variable and loads an appropriate set of user controls. It appears that the user is going to different pages when in reality it is the same page with...
2
by: D | last post by:
Most of my web forms have multiple buttons (Proceed, Back, link buttons for various screens, etc.) It looks like, say a required field validator for example, gives me an error message no matter...
0
by: .Net Newbie | last post by:
I am relatively new to .Net and have been coding an intranet site for my employer for a couple of months. I am currently stuck coding in a text-editor called EditPlus without access to the VS.Net...
5
by: Alex Maghen | last post by:
In ASPX 2.0 with MasterPages and all that, my entire page only has one actual <FORM>. But there are several different sections of the page that provide what are functionally separate forms with...
5
by: mayur_hirpara | last post by:
Hi, I have been developing web applications for a while now. However, as I was thinking through the architecture I really don't understand the "How server can identify between which buttons has...
8
by: fonzie | last post by:
Is it possible to have a data entry form where the information is stored in several different tables (5 or 6)? I have an inventory database where Table1 stores all of the data common to all...
9
by: Gummy | last post by:
Hello, I created a user control that has a ListBox and a RadioButtonList (and other stuff). The idea is that I put the user control on the ASPX page multiple times and each user control will...
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$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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.