I'm trying to do a redirect for mobile devices.
My phone is using NetFront v3.0 for Sprint PCS
Here's my code
Public Sub Page_Load(sender as Object, e as EventArgs)
If not isPostBack Then
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' If Netscape, redirects to non-layers version of the page (default_NN.aspx) if not
' there already.
Dim hbc as HttpBrowserCapabilities = Request.Browser
If Request.Browser( "IsMobileDevice" ) = True then
Response.Redirect( "MobileDefault.aspx" )
Else
Dim strPath as String
strPath = Request.FilePath()
If strPath.IndexOf("_NN") = -1 and hbc.Browser = "Netscape" then
Response.Redirect( "default_NN.aspx" )
End if
End if
End if
End Sub
If I use the OpenWave SDK browser emulator, it redirects me to MobileDefault.aspx. But when I test it on my phone, it redirects me to default_NN.aspx instead. I can't figure this one out. Could it be a caching problem since I didn't change the code until today?
Aaron