tags:

views:

23

answers:

1

Can anyone plz tell me the difference between passthrough and Transform modes of literal control with an example if possible.

+2  A: 

There are different Literal Modes Literal.Mode

  1. PassThrough : The contents of the control are not modified.
  2. Encode : The contents of the control are converted to an HTML-encoded string.
  3. Transform : Unsupported markup-language elements are removed from the contents of the control. If the Literal control is rendered on a browser that supports HTML or XHTML, the control's contents are not modified.

Have a look at this MSDN article http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.literal.mode.aspx

and take a look at this implemented example Use ASP.NET's Literal control to its full potential

Muhammad Akhtar
nice answer +1 ....... ;)
Azhar