IsMobileDevice issue

S

Sumantra

I have two application one web and another mobile. Now from the web i want to
redirect those requests to the mobile application which are coming from the
mobile device. But I have a mobile phone with Opera browser where HTML can be
rendered. From there if I access the application it seems the IsMobileDevive
property is returning false??? But for the WML phones IsMobileDevice is
returning true.
Why it is like that?
 
S

sumithpdd

Its because of the changes to the mobile browser and this function
doesnot check the http header properly. So be specific when you are
checking for type of browser eg.
{
if (Request.Browser.Platform == "WinCE")
{
Response.Redirect("~/Mobile/default.aspx");
}
if (Request.Browser["IsMobileDevice"] == "true" )
{
Response.Redirect("~/Mobile/default.aspx");
}
else
{
Response.Redirect("~/Desktop/default.aspx");
}
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top