what i want to do is, show my mobile version of the page if the client is a mobile browser, that works fine. but i also have a link on my mobile site so that users can choose to see the (not mobile site) if they prefer.
if (isMobileBrowser()) { if (Session["showpage"] == null) { if (!string.IsNullOrEmpty(Request.QueryString["mobile"]) && Request.QueryString["mobile"] == "0") { Session["showpage"] = "true"; Redirect to my normal page } else { Redirect to my mobile page }
} }
But the : Session["showpage"] = "true"; Is not getting set i can see....
extensionless URLs the Session State does not get initialized
How can i make Session state work with extensionless URL's?
I dosent seem to work :-(
Hi amigo
Could you specify exactly what you have tried in order to make this work? What config files have you tried to modify etc.?
Please ellaborate a bit more so it's easier to help you out.
/Jan
Hi Jan,
i tried adding this to my web.config:
system.webserver->modules->
<remove name="Session" />
<add name="Session" type="System.Web.SessionState.SessionStateModule" preCondition="" />
it dosent seem to work for me...
what i want to do is, show my mobile version of the page if the client is a mobile browser, that works fine.
but i also have a link on my mobile site so that users can choose to see the (not mobile site) if they prefer.
so if they click the "see entire site" link on my mobile site i send them to:
http://www.xxx.com?mobile=0
and in my masterpage i have:
if (isMobileBrowser())
{
if (Session["showpage"] == null)
{
if (!string.IsNullOrEmpty(Request.QueryString["mobile"]) && Request.QueryString["mobile"] == "0")
{
Session["showpage"] = "true";
Redirect to my normal page
}
else
{
Redirect to my mobile page
}
}
}
But the : Session["showpage"] = "true";
Is not getting set i can see....
any ideas here??
still no idea what to doo....
is working on a reply...