web requests and mobile requests

  • Thread starter Fernando Arámburu
  • 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
 
J

Joerg Jooss

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,
 

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

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top