System.Web 2.0.0.0 System.Enum

The enumeration represents the modes that you can specify for how the content in a control is rendered. The property uses these enumeration values to set the behavior of the contents of the property in a control.

If you specify PassThrough, the entire contents of the property are passed to the device or browser without any modifications. For example, if the property of a control contains an <hr> tag, it is sent to all devices and browsers regardless of whether it is supported.

If you specify Encode, the contents for the property are converted into an HTML-encoded string before rendering. For example, if the property of a control contains an <hr> tag, it will be converted to &lt;hr&gt; and sent to the device or browser.

If you specify Transform, the rendering behavior of the property depends on the type of markup being rendered. When the control is rendered for a device or browser that supports HTML or XHTML, specifying produces the same behavior as specifying . All markup tags and elements for the property are rendered for the requesting browser.

When the control is rendered for a markup language other than HTML or XHTML, such as WML or cHTML, you can use the value to remove unsupported markup elements. In this case, any markup-language elements of the property that are not supported in the targeted markup language are not rendered for the control. For example, if the property of a control contains an <hr> tag, the tag is removed before the content is sent to a WML device. If an unsupported tag contains content, only the tag is removed and the content is sent to the device or browser. For example, if the property contains the content <XYZ>Test</XYZ>, the <XYZ> and </XYZ> tags are removed while the text Test is sent to the device or browser.

Specifies how the content in a control is rendered.

- Field
  System.Web.UI.WebControls.LiteralMode

  The literal control's contents are HTML-encoded.

  2.0.0.0
- Field
  System.Web.UI.WebControls.LiteralMode

  The literal control's contents are not modified.

  2.0.0.0
- Field
  System.Web.UI.WebControls.LiteralMode

  The literal control's unsupported markup-language elements are removed. If the literal control is rendered on a browser that supports HTML or XHTML, the control's contents are not modified.

  2.0.0.0