Skip to main content
Inspiring
April 27, 2007
Answered

How can i use Session variable in repeating region

  • April 27, 2007
  • 1 reply
  • 306 views
I have a session variable assigned to the ID#(auto number in access db) of messages posted. The variable only gets assigned to the recordset that is displayed first (sort by message ID descending). I would like to find a way to make the variable be assigned to all the records, so the variable is passed to the delete page. If i use a URL parameter to send the message ID then someone could change the number in a browser and delete messages not intended for the user.
if you want to see the example in action goto link at bottom of message. The save and reply links are URL parameters the reply uses the MM_Username variable to enter the name of sender so a URL parameter is OK but click on save and then change the msdID number in the browser to a different number and you could save and view other message not intended for your login id. The delete link is using a session variable that i assigned from the recordset as the msdID# (auto number from access) and the correct msdID# does not get assigned.
What about masking the URL parameters, this would be simple but how can i do that?
Thanks
MikeL7
PAGE WITH SESSION VARIALBE TO PASS TO DELETE PAGE (save and reply are URL parameters)
http://www.gohbcc.com/CallCenter/EmployeeMessagesVIEW2.asp
USERNAME: admin PASSWORD: 1234

the links from other pages in my site will take you to:
http://www.gohbcc.com/CallCenter/EmployeeMessagesVIEW.asp this is ALL URL parameters enter 2 after VIEW to use session variables
This topic has been closed for replies.
Correct answer MikeL7
Your message got me to figure out how to make it work, i put the code to create the variable just before the repeating region table and then made form buttons that post the variable and labeled the buttons and it works perfect. THANKS

1 reply

Inspiring
April 28, 2007
>>I have a session variable assigned to the ID#(auto number in access db) of messages posted.

I not sure if I follow your in the description. I would assign the Record ID to the session variable.

Place the Record id in the repeat region.

Then you could assign that record id to a session variable when the button is click, capture the button click event. Then redirect to the EMPLOYEEMessageDELETE1.asp page, which will read in the session variable (record id) to be deleted.

David Pearson

MikeL7AuthorCorrect answer
Inspiring
April 28, 2007
Your message got me to figure out how to make it work, i put the code to create the variable just before the repeating region table and then made form buttons that post the variable and labeled the buttons and it works perfect. THANKS