cannot redirect to mobile page

C

Carlos

Hi all,

I was just trying to execute sample code to redirect the
output to a mobile page from a Pocket PC but it did not work.

I tried from the root aspx file (page_load event):

if (Request.Browser["IsMobileDevice"] == "true" )
Response.Redirect("indexm.htm");
else
Response.Redirect("indexd.htm");

I also have

<configuration>
<system.web>
<httpRuntime
useFullyQualifiedRedirectUrl="true" />
</system.web>
</configuration>

in the web.config file.

The desktop page is always displayed. but the mobile is not from Pocket PC
How can I trace it and determine the mobile device? Thanks,

Carlos.
 
C

Carlos

continued from previous post...

when I trace the page it tells me that the user agent is
indeed Windows CE:pPC;240x320. So.. I do not know
why dows not detect the isMobileDevice condition

Thanks again,

Carlos.
 
B

bruce barker

look at the useragent string the pocket pc is posting. then in
machine.config, check that the <browserCaps> is correctly identifying the
agent string as mobile device.

-- bruce (sqlwork.com)



| Hi all,
|
| I was just trying to execute sample code to redirect the
| output to a mobile page from a Pocket PC but it did not work.
|
| I tried from the root aspx file (page_load event):
|
| if (Request.Browser["IsMobileDevice"] == "true" )
| Response.Redirect("indexm.htm");
| else
| Response.Redirect("indexd.htm");
|
| I also have
|
| <configuration>
| <system.web>
| <httpRuntime
| useFullyQualifiedRedirectUrl="true" />
| </system.web>
| </configuration>
|
| in the web.config file.
|
| The desktop page is always displayed. but the mobile is not from Pocket PC
| How can I trace it and determine the mobile device? Thanks,
|
| Carlos.
|
|
 
C

Carlos

Thanks Bruce,

it was kind of tricky to understand the browsecaps section in the
machine.config file. I believe that it just
there was a mistake in the IE version that start supporting
mobility. The range was from 5-9, when I changed from 4-9 it worked fine. I
would like to test with other browsers too.

Thanks again.

Carlos.
 

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,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top