This documentation is archived and is not being maintained.

PreferredRenderingType Property

.NET Framework 1.1

Returns the general name for the type of content that the device prefers. The default value is html32.

public virtual string PreferredRenderingType {
   get
}

Remarks

This property takes one of the following string values: html32, wml11, wml12, chtml10.

Example

The following example demonstrates how to use the PreferredRenderingType property to determine the type of content the device prefers.

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
     
Dim currentCapabilities As MobileCapabilities = CType(Request.Browser, MobileCapabilities)
If currentCapabilities.PreferredRenderingType = "html32" Then
   lblNotice.Text = "Html HTML Rendering used"
Else
   If currentCapabilities.PreferredRenderingType = "wml11" Then
      lblNotice.Text = "Wml WML Rendering used"
   End If
End If
        
End Sub

[C#]

public void Page_Load(Object sender, EventArgs e)
{
   MobileCapabilities currentCapabilities
      = (MobileCapabilities)Request.Browser;
   if (currentCapabilities.PreferredRenderingType == "html32")
   {
      lblNotice.Text = "HTML Rendering used";
   }
   else if (currentCapabilities.PreferredRenderingType == "wml11")
   {
      lblNotice.Text = "WML Rendering used";
   }
}

See Also

Applies to: MobileCapabilities Class

Show: