Share via


How to: Create a Mobile Version of a Content Page

 

Applies To: Windows Server 2012 Essentials, Windows Home Server 2011, Windows Storage Server 2008 R2 Essentials, Windows Small Business Server 2011 Essentials

You can create content pages that are specifically intended for viewing on a mobile device.

To define a mobile page

  1. Open the .aspx.cs file for the page.

  2. Add the IsMobile property to the ContentPage class and define the value as true to specify the page as a mobile page.

    public override bool IsMobile  
    {  
       get { return true; }  
    }  
    
  3. Save the .aspx.cs file.

  4. Add a new mobile element to the webaddin.xml file.

    <Mobile>  
       <DefaultSrc>Default.aspx</DefaultSrc>  
       <BrowserTitle>Sample Addin</BrowserTitle>  
       <NavigationText>Sample</NavigationText>  
       <HeaderText>Sample Mobile</HeaderText>  
    </Mobile  
    
  5. Publish the application.