System.Web.UI.WebControls.Localize Class

Reserves a location on a Web page in which to display localized static text.

See Also: Localize Members

Syntax

public class Localize : Literal

Remarks

In this topic:

Introduction

Use the System.Web.UI.WebControls.Localize control to reserve a location on a Web page in which to display localized text.

Note:

Controls that are outside the body element are ignored.

The System.Web.UI.WebControls.Localize control inherits from the System.Web.UI.WebControls.Literal control and is identical to it in every way. The System.Web.UI.WebControls.Localize control is used at design time to distinguish static text that can be localized from other static text. Although the System.Web.UI.WebControls.Label control allows you to apply a style to the displayed text, the System.Web.UI.WebControls.Localize control does not. You can programmatically manage the text displayed in the control by setting the Literal.Text property, inherited from the System.Web.UI.WebControls.Literal control.

Note:

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, see Securing Standard ControlsHow 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.

Declarative Syntax

Example

<asp:Localize
    EnableTheming="

Requirements

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0