Session Value Issuehttp://forums.asp.net/t/1803142.aspx/1?Session+Value+IssueSun, 13 May 2012 07:42:33 -040018031424978185http://forums.asp.net/p/1803142/4978185.aspx/1?Session+Value+IssueSession Value Issue <p>Hi,</p> <p>i am calculating cityid and then save it in session and then save this cityid in table with other data.For example i calculate cityid in ifram or anyother handler or ascx etc etc.and then returns to that function to save those information including cityid.</p> <p>Now as we must have more than one user sharing this code and hence application.one will set session to 1 and other will set to 2.as i am using one cityid and one session for all user then how i ll distinguish among users?will it not overwrite it?how i can have check that this cityid belongs to this user?</p> 2012-05-13T07:28:05-04:004978192http://forums.asp.net/p/1803142/4978192.aspx/1?Re+Session+Value+IssueRe: Session Value Issue <p>hi,</p> <p>In your scenario you have to save object in session rather then simple &quot;cityid&quot; .</p> <p>if you have user object then add an other attribute in it with the name &quot;CityId&quot; and update the current user object with the city id and add your updated object in session so that you will be having &quot;CityId&quot; against &quot;UserID&quot;.</p> <p>objuser.CityID=1</p> <p>&nbsp;Session.Add(&quot;SysUser&quot;,objUser);</p> <p>Another secnarion is that if You want to maintain multiple user in the same session then maintain collection of user in the session.</p> <p></p> 2012-05-13T07:42:33-04:00