standard asp.net + mobile asp.net

  • Thread starter Thread starter Jeff
  • Start date Start date
J

Jeff

Hey

asp.net 2.0

I wonder if it's possible to have both standard asp.net and mobile asp.net
in the same web application. When the web server gets a request it can
detect if this requested comes from a mobile or not???.

Maybe there is setting in web.config specifying the default page if
requested by a mobile phone???

Jeff
 
I don't know what you mean by a mobile asp.net site. I thought there was
only an asp.net web site--possibly with special pages that will display well
in mobile devices.

That given, the code below will determine if the device accessing the page
uses the WinCe operating system, in which case it can the be directed to a
page at the site that will display nicely in the mobile device.

If your mobile device uses an operating system other than WinCe, then just
substitute that.


Dim temp As String = LCase(Request.Browser.Platform) 'WinCE
If InStr(temp, "wince") > 0 Then
'send them to the appropriate page for mobile
Else
'send them to a normal page
End If
 
Back
Top