web requests and mobile requests

  • Thread starter Thread starter Fernando Arámburu
  • Start date Start date
F

Fernando Arámburu

Hello everybody,

I´m working on a web application and I need to make a difference between
a page called from a PC and one made from Mobile because I need to do a
transfer to diferent pages,

Do I make myself clear?

For example I got my mail page on

www.mysite.com/index.aspx

and I need to verify

if (user is calling me from mobile)
Server.Transfer("indexMobile.aspx");
else
Server.Transfer("indexWeb.aspx");

but I don´t know how to ask "user is calling me from mobile"
Is that possible?

Thanks in advance

Fernando Arámburu
 
Fernando said:
Hello everybody,

I´m working on a web application and I need to make a difference
between a page called from a PC and one made from Mobile because I
need to do a transfer to diferent pages,

Do I make myself clear?

For example I got my mail page on

www.mysite.com/index.aspx

and I need to verify

if (user is calling me from mobile)
Server.Transfer("indexMobile.aspx");
else
Server.Transfer("indexWeb.aspx");

but I don´t know how to ask "user is calling me from mobile"
Is that possible?

You could use the User-Agent header to tell what kind of browser sent
the request. Have a look at System.Web.HttpRequest.Browser.

Cheers,
 
Back
Top