Get mobile device code Capabilities (VB.net)
<%@ Page
Inherits="System.Web.UI.MobileControls.MobilePage"
Language="VB"
%>
<%@ Register
TagPrefix="mobile"
Namespace="System.Web.UI.MobileControls"
Assembly="System.Web.Mobile"
%>
<script runat="server" language="VB">
Sub Page_Load(ByVal Sender as Object, ByVal E as EventArgs)
Dim MyMobCaps as Mobile.MobileCapabilities
MyMobCaps = Request.Browser
If MyMobCaps.IsColor Then
Image1.ImageURL="color.gif"
Else
Image1.ImageURL="nocolor.gif"
End If
End Sub
</script>
<mobile:Form id="Test" runat="server">
<mobile:Image
runat="server"
id="Image1"
AlternateText="No graphics supported!">
</mobile:Image>
</mobile:Form>
Related examples in the same category