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

ASP Session question 1

Status
Not open for further replies.

tbone231

MIS
Jul 30, 2001
3
US
If I have code which looks like this:

session("NameCheck") = true
session("Name") = rsLogIn("FirstNm")
session("Email") = rsLogIn("EmailAddrTxt")
session("PWCheck") = true
session("AcctNbr") = rsLogIn("AcctNbr")
session("Valid") = true
session("Attempted") = true

Then, I abandon my session.

Is there a way I can move to another page and retain my "name" and "email" fields?

I am not sure if this is possible, I was thinking the use of a hidden field may make it possible but am really unsure.

Does anyone have an idea?
 
why don't you abandon session then set Session("Name") and Session("Email") again before moving to another page? (because you use Session("PWCheck") to check if user has logged in or not)
I think the browser will keep the same SessionID.

 
Without retrieving the session you can either place the fields you want in a Querystring or hidden fields.
Querystring:
Code:
<a href=&quot;mypage.com?name=<%=rsLogIn(&quot;FirstNm&quot;)%>&email=<%=rsLogIn(&quot;EmailAddrTxt&quot;)%>&quot;>My Page Link</a>
Hidden Fields:
Code:
<form method=&quot;POST&quot; action=&quot;mypage.com&quot;>
  <input type=&quot;hidden&quot; name=&quot;name&quot; value=&quot;<%=rsLogIn(&quot;FirstNm&quot;)%>&quot;>
  <input type=&quot;hidden&quot; name=&quot;email&quot; value=&quot;<%=rsLogIn(&quot;EmailAddrTxt&quot;)%>
  <input type=&quot;submit&quot;>
</form>
Hope this helps. Wushutwist
 
Sorry about my previous post. I just found out that after you call Session.Abandon, a new Session will be assigned for a new request to the server.
I think the only way to do is what Wushutwist suggested.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top