This documentation is archived and is not being maintained.

PreferredRenderingMime Property

.NET Framework 1.1

Returns the MIME type of the type of content that the device prefers. The default value is text/html.

public virtual string PreferredRenderingMime {


The following example demonstrates how to use the PreferredRenderingMime property to determine the MIME type that 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)
Dim prefMime As String = currentCapabilities.PreferredRenderingMime

If prefMime = "text/html" Then
   lblNotice.Text = "Html supported browser"
   If prefMime = "text/vnd.wap.wml" Then
      lblNotice.Text = "Wml1.1 Supported browser"
   End If
End If
End Sub


public void Page_Load(Object sender, EventArgs e)
   MobileCapabilities currentCapabilities
      = (MobileCapabilities)Request.Browser;
   String prefMime = currentCapabilities.PreferredRenderingMime;
   if (prefMime == "text/html")
      lblNotice.Text = "Html supported browser";
   else if (prefMime      == "text/vnd.wap.wml")
      lblNotice.Text = "Wml1.1 Supported browser";

See Also

Applies to: MobileCapabilities Class