Last post May 13, 2012 08:42 AM by kashif786
May 13, 2012 08:28 AM|shafiqkr|LINK
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.
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?
May 13, 2012 08:42 AM|kashif786|LINK
In your scenario you have to save object in session rather then simple "cityid" .
if you have user object then add an other attribute in it with the name "CityId" and update the current user object with the city id and add your updated object in session so that you will be having "CityId" against "UserID".
Another secnarion is that if You want to maintain multiple user in the same session then maintain collection of user in the session.