I done project in ASP.net MVC3. In my project i create a session as follows in Home Controller
if (Session["ulclass"] == null)
{
Session["ulclass"] = "list";
}
I use this session to my Product List page.. as a class for div tag as follows..
<div id="listheading" class="listHead" @if (Session["ulclass"].ToString() == "grid")
{
<text>style = "display:none;";</text>
}>
When i copy this Productlist URL from FireFox to Chrome…
session value not come.. it produce the error…
Can any one help this ?
You can use cookieless sessions. That way the session id is sent in the URL instead of a cookie, so then you could just copy the URL anywhere and you are still in the same session.
Put this in web.config:
(The drawback is of course that anyone can copy the URL anywhere and still be in your session…)
More about cookieless session: http://msdn.microsoft.com/en-us/library/aa479314.aspx