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

ASP sessions 1

Status
Not open for further replies.

Sunil606

Programmer
Dec 8, 2003
27
GB
How can I make use of asp session level variables? I have created a registration page which takes in session level variables. Another page processes the details to a database. I would like to manipulate those variables when a user logs to personalise web pages. If anyone has any suggestions I would be grateful.
 
Session variables are visible throughout all pages. A must for implementing secure sessions.
 
Simply set your form or other variables to a session variable.

Example 1:

Session("sFontFace") = "arial"
...
<font face=&quot;<%=Session(&quot;sFontFace&quot;)%>&quot;>


The proper usage however is to set your Session vars to local vars though.

Example 2:

Dim sFontFace
Session(&quot;sFontFace&quot;) = &quot;arial&quot;
sFontFace = Session(&quot;sFontFace&quot;)
...
<font face=&quot;<%=sFontFace)%>&quot;>


I hope I am answering your question. Please let me know.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top