Forum Moderators: open

Message Too Old, No Replies

Passing Variables across multiple pages

Asp

         

jefferson

4:50 pm on Aug 30, 2005 (gmt 0)

10+ Year Member



I have an ASP login page. It passes an employee id(empid) to another page using post. checks to see if the empid exists in a database, then displays the page accordingly(homepage). That part works fine. What I need to do is... I have a link that goes to a powerpoint presentation. At the end of the pres is a link that will go to an ASP form. This form is where i need the EmpID. but how would i pull it from the homepage? not wanting to use cookies. is it maybe possible to pass a variable to multiple pages using the post from the login page?

txbakers

5:01 pm on Aug 30, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You either can keep it in the QueryString every where you go, or use a Session cookie which will store it.

I opt for the Session.

jefferson

5:17 pm on Aug 30, 2005 (gmt 0)

10+ Year Member



how would i go about using a session?

jefferson

5:36 pm on Aug 30, 2005 (gmt 0)

10+ Year Member



Nevermind got it all figured out thanks for the advice

mrMister

7:57 pm on Aug 30, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



A cookie, is the right choice for that. Don't use a session variable.

A session will create a seperate unique ID and store it as a cookie anyway, this cookie then references your own ID (in effect you're creating two IDs instead of one) and on top of that you're enabling all the baggage that goes hand in hand with session usage.

Have a quick read of this to get you started...

[w3schools.com...]