Advertisement

08.03.2008 at 01:40PM PDT, ID: 23617576
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.2

ASP Session values are sometimes dropped from page to page

Asked by boydmd in Active Server Pages (ASP)

Tags: , ,

I've got a website which uses Session variables to keep track of the currently logged in userid.  When a user logs in we set a session variable:

Session("ActiveCustomerID") = rs(0)

Once logged in, getting the user account works fine... ActiveCustomerID= Session("ActiveCustomerID")

however we have a case where we need to set Other Sessions, we do this on one page.  Session("ActiveCustomer") = "56"

This value, is not recognized on any other page, the same page would recognize the value from our normal login procedure.  For testing/example purposes I've also create a Username and Age session variable and assigned some values.

Code Snippits:
---------------------------
Page one:
<%
Session("username")="Donald Duck"
Session("age")=50
Session("ActiveCustomerID")="37"
%>
<!-- #include File="loginPage.asp" -->
<%
Username=Session("username")
age=Session("age")
%>
<div class="channel-text">&nbsp;Active username is:  <%=Username %> and age is <%=age %></div>
<a href="testSession.asp">Test Session Page</a>

---------- both username and age can be displayed normally on this page, however they are missing on the TestSession.asp page -----------------


Page2: LoginPage.asp
Set RS = Conn.Execute(SQL)
      If NOT RS.eof and not rs.bof then
            Session("ActiveCustomerId") = rs(0)
[other unrelated stuff here]
Response.Redirect "UserHome.asp"

---------------------------this page works OK and sets ActiveCustomerID ---------------------

Page3:  UserHome.asp

<a href="testSession.asp">Test Session Page</a>


Page4: TestSession.asp

<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<title>Test of session passing</title>
</head>

<body>


<%
Username = Session("username")
age = Session("age")
ActiveCustomerID = Session("ActiveCustomerId")
%>

<span>
    Username: <%=Username %> <br />
    age: <%=age %> <br />
    ActiveCustomerID: <%=ActiveCustomerID %> <br />
</span>

</body>
</html>

Here username and age are missing but active customer ID is there (if you have logged in).  Basically setting username and age do not work but setting activeCustomer ID does.

Any ideas would be greatly appreciated?

Start Free Trial
 
Loading Advertisement...
 
[+][-]08.03.2008 at 02:00PM PDT, ID: 22148829

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.03.2008 at 02:42PM PDT, ID: 22148975

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.03.2008 at 03:08PM PDT, ID: 22149046

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Active Server Pages (ASP)
Tags: Classic ASP / VB, IE 7, none
Sign Up Now!
Solution Provided By: boydmd
Participating Experts: 1
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628