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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Session variable

Status
Not open for further replies.

gesrod

Technical User
Jan 30, 2009
8
GB
I have an asp page showing results in a list view. I have a link on each row to a detail page which works fine.. I am trying to pass a session variable at the same time from a field in the selected row but the session variable only contains the value from the last row and not the selected row, any help much appreciated. Thank you in advance. He's
 
That depends on how your code is setting the session variable value. ASP does not 'know' what you are clicking on in your browser, so you will have to use javascript to set a value possibly in 'hidden' variable when you 'check' the box.

OR your code has to test for which boxes are checked, to do this all the check boxes should have the same name so the values will be passed as a comma separated string of the checked boxes.

Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.

Never mind this jesus character, stars had to die for me to live.
 
Hi Chris,

Thank you for assisting...

The row that I am wishing to carry over a session variable is the same row I have the following link on.. ("IDCtr" is in the same record as a field value ("specid") I want to store in a session)

<td width="50"><font size="1"><A HREF="spec_id.asp?<%= MM_keepURL & MM_joinChar(MM_keepURL) & "IDCtr=" & QuickUnconfirmed.Fields.Item("IDCtr").Value %>">Edit</A></font></td>

When I select this link it knows the value of the "IDCtr" for that row, how does the detail page know which record to open using the code above on the subsequent page with this value ?

thank you in advance.

Gez
 
Your code on the 'receiving' URL has to construct and then query the database with that row ID and display the retrieved data.


Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.

Never mind this jesus character, stars had to die for me to live.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top