Click here to Skip to main content
11,935,031 members (55,047 online)
Rate this:
Please Sign up or sign in to vote.
See more: MVC3
Hi Friends,

I have just started the session varibale in my project for the logged in user.
The problem that i am getting is once i set the login the session variable

it is not persist on the second is coming blank.
what is the resion behind this.i need that session on the another page also.

Please help me.
Posted 10-Aug-12 22:36pm

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

I am damn sure that somewhere your session is getting cleared. You need to go through the coding and find the place where it is getting cleared. If your session is coming null then somewhere in code only you are making it null and you forgot about that. If your session is coming empty then check for the value you are assigning to the session. Try this:
if(userInfo.UserName != string.empty)
    //show error.


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web03 | 2.8.151126.1 | Last Updated 12 Aug 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100