Материал из .Net Framework эксперт
(разн.) ← Предыдущая | Текущая версия (разн.) | Следующая → (разн.)
Using the Localize Control
The ASP.NET Framework includes a control named the Localize control.
This control is included in the Framework to make it easier to localize big chunks of text in a page.
<%@ Page Language="C#" UICulture="auto" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
<title>Show Localize Control</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Localize
ID="locBodyText"
meta:resourceKey="locBodyText"
Runat="server">
Here is the page body text
</asp:Localize>
<br /><br />
<asp:Literal
ID="ltlBodyText"
runat="server">
Here is some literal text
</asp:Literal>
</div>
</form>
</body>
</html>
The difference between the Localize control and Literal control is apparent only in DesignView.