See Also: Literal Members
In this topic:
Use the System.Web.UI.WebControls.Literal control to reserve a location on the Web page to display text. The System.Web.UI.WebControls.Literal control is similar to the System.Web.UI.WebControls.Label control, except the System.Web.UI.WebControls.Literal control does not allow you to apply a style to the displayed text. You can programmatically control the text displayed in the control by setting the Literal.Text property.
This control can be used to display user input, which might include malicious client script. Check any information that is sent from a client for executable script, SQL statements, or other code before displaying it in your application. ASP.NET provides an input request validation feature to block script and HTML in user input. Validation server controls are also provided to assess user input.
For more information about security, see Securing Standard Controls, How to: Protect Against Script Exploits in a Web Application by Applying HTML Encoding to Strings, and Introduction to Validating User Input in ASP.NET Web Pages.