[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.aspnet.mobile

Identifying the Mobile Device Request

Ganesh babu

4/1/2002 3:21:00 PM

Dear All,

I am having a Mobile Web Application which is developed
using MMIT.I am Targeting for Mobile Phones and PDA's.

Now my question is

When i get a Request from Mobile Phone/Pocket Pc or PDA i
need to redirect to
a URL for Mobile Phone and another URL for my Pocket PC.

How my Mobile App will process the Request whether it is
from Mobile Phone or a
Pocket PC.How it is acheived in Real Time.

Suggest with a Code Sample Please....


Thanks and Best Regards
Ganesh babu Natarajan




2 Answers

Doug Thews

4/2/2002 4:44:00 AM

0

You could work with the MobileCapabilties object to determine whether it's
an HTML browser (PocketPC) or a WML browser (phone). I swiped this code
directly from the MMIT documentation. It has other examples that will give
you additional information.

System.Web.Mobile.MobileCapabilities currentCapabilities;

MobileCapabilities currentCapabilities =
(MobileCapabilities)Request.Browser;

// Programatically find the mobile capabilities without using
// DeviceSpecific Filters.
if(currentCapabilities.PreferredRenderingMIME=="text/html")
{
Label2.Text = "You are using an html supported device.";
}
else if(currentCapabilities.PreferredRenderingMIME=="text/vnd.wap.wml")
{
Label2.Text = "You are using a wml supported device.";
}
Label1.Text = "Screen Width (chars): " +
currentCapabilities.ScreenCharactersWidth;


--
Doug Thews
Director, Software Development
D&D Consulting Services


"Ganesh babu" <babu.ganesh@sella.it> wrote in message
news:0c5c01c1d980$23f589e0$9ae62ecf@tkmsftngxa02...
> Dear All,
>
> I am having a Mobile Web Application which is developed
> using MMIT.I am Targeting for Mobile Phones and PDA's.
>
> Now my question is
>
> When i get a Request from Mobile Phone/Pocket Pc or PDA i
> need to redirect to
> a URL for Mobile Phone and another URL for my Pocket PC.
>
> How my Mobile App will process the Request whether it is
> from Mobile Phone or a
> Pocket PC.How it is acheived in Real Time.
>
> Suggest with a Code Sample Please....
>
>
> Thanks and Best Regards
> Ganesh babu Natarajan
>
>
>
>


(Joseph Croney (MSFT))

4/2/2002 9:15:00 AM

0