Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Submit button value (Want it to have 2 values!)

Status
Not open for further replies.

JonathanG6SWJ

Programmer
Joined
Jan 18, 2005
Messages
39
Location
GB
Hi
I have an asp page that displays the results of a DB query in a simple table.

I am using a submit button within the table and setting its value to FirstName&SurName of the person. So I end up with one button for each persons name. The value (name of person) of the button is then posted to another page when a button is hit. All this works fine. However I want to submit a personal_obj_no (unique numerical ID) to the next page not their name (cause I'm bound to end up with two or more identical names at some stage). The button needs to display the persons name.

How can I submit one thing but display another from / on a submit button.
Is there an alterantive way to identify cursor position and hence cell value of a table?

Many thanks in advance.
Jonathan
 
Individual forms with hidden variables for each would do the trick.

Alternately, name the buttons differently (submit939398, submit939399, etc.) and go through the collection on the next page. Or name the buttons like that and have hidden fields that tell you the starting and ending number, if appropriate, and just check all of them (Request.Form("submit" & i)).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top