asp.net.ph

Skip Navigation Links

Localize Control Syntax

ASP.NET Syntax   ASP.NET Syntax for Web Controls


Creates a location on a Web page to display localized, static text.

Declarative Syntax

For information on the individual members of this class, see Localize in the class library.

Remarks

The Localize control reserves a location on a Web Forms page to display localized text.

The Localize control is identical to the Literal control. Authors can programmatically control the text that is displayed in the Localize control by setting the Text property, which is inherited from the Literal control.

Syntax Example

The following example demonstrates how to use the Localize control to localize a block of static text. Page resources in the App_LocalResource folder are used to customize the text for different languages.

<%@ Page Language = "C#" 
   Culture = "auto" 
   meta:resourcekey = "PageResource1" 
   UICulture = "auto" %>

<!DOCTYPE html PUBLIC 
   "-//W3C//DTD XHTML 1.0 Transitional//EN" 
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns = "http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Localize Example</title>
</head>

<body>
<form runat="server">
<div>
   <asp:localize id="localize1" runat="server" 
      text = "hello world!"
      meta:resourcekey = "localize1resource1" />

</div>
</form>
</body>
</html>
See Also

Localize Class   Localize Web Server Control



© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note