Changing session variables

Results 1 to 2 of 2

Thread: Changing session variables

  1. #1
    Join Date
    Dec 1969

    Default Changing session variables

    I chose to set a session variable along with the request string, because if the web user decides to go back along the sequence of pages, the query string doesnt get passes back. my question is, once i set my session variable, how do i update it? i pasted a lil code also...<BR><BR>PAGE 1<BR>&#060;A HREF="EnterCat.asp?OwnerID=5"&#062;click&#060;/a&#062;<BR><BR><BR>PAGE 2<BR>Session("OwnerID") = Request.QueryString("OwnerID")<BR><BR>set rs = Server.CreateObject("ADODB.RecordSet")<BR><BR>strs ql = "select NM_NAME from NAMES where NM_ID = " & Session("OwnerID")<BR><BR>rs.Open strsql, Application("ConnectStr"),3,2<BR><BR><BR>Now it works fine the first time, but when i go back and click a different button that changes the OwnerID to 7, PAGE 2&#039s variable doesnt even show up... can i get some help?<BR><BR>Thanks. Kyle

  2. #2
    Join Date
    Dec 1969

    Default RE: Changing session variables

    If you are sending it through a form you need to say <BR>session("Owner") = Request.Form("Owner")<BR>But I would just leave the .Form and .querystring off and let the asp figure it out. ie:<BR>session("Owner") = request("Owner")

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts