Last post Jul 18, 2008 03:23 PM by dswersky
Jul 18, 2008 02:15 PM|KyD|LINK
I am new to mobile programming. I was asked to make our site accept mobile devices.
i worte this small code to detect the my blackberry but is doesn't work.
Would you please look at the code and tell me what I am doing wrong?
Also, does anyone have any good links for mobile device programming?
Partial Class Default2
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Label1.Text = CheckBrowserCaps()
Function CheckBrowserCaps() As String
Dim labelText As String = ""
If Request.Browser.IsMobileDevice Then
labelText = "Browser is a mobile device."
labelText = "Browser is not a mobile device."
End Function 'CheckBrowserCaps
Jul 18, 2008 03:22 PM|jportelas|LINK
Is it always writing: "Browser is not a mobile device."?
Please check the userAgent string into the browser object to see some more info.
Jul 18, 2008 03:23 PM|dswersky|LINK
Here's an article: