ASP.NET Tutorial/Mobile/DeviceSpecific

Материал из .Net Framework эксперт
Перейти к: навигация, поиск

DeviceSpecific

   <source lang="csharp">

<%@ Page Inherits="System.Web.UI.MobileControls.MobilePage" Language="VB" %> <%@ Register TagPrefix="mobile" Namespace="System.Web.UI.MobileControls" Assembly="System.Web.Mobile" %> <mobile:Form id="Form1" runat="server">

 <DeviceSpecific>
   <Choice Filter="isHTML32">
     <HeaderTemplate>
       Header visible only in HTML Browsers
       
<img Src="poweredbyaspnet.gif" border="0">

     </HeaderTemplate>
     <FooterTemplate>

       Footer visible only in HTML Browsers
     </FooterTemplate>
   </Choice>
   <Choice>
     <mobile:Label id="Lable1" runat="server" >Powered by ASP.NET Visible on non-HTML browsers</mobile:Label>
   </Choice>
 </DeviceSpecific>
 <mobile:Label id="Label1" runat="server">Content of Mobile Form visible in all devices</mobile:Label>

</mobile:Form></source>