Tuesday, February 17, 2009

Localization in ASP.NET markup

To localize HTML or ASP.NET controls on the markup:

<asp:checkbox runat="server" id="chkOrderable" text=""><%$ Localize:Page_Property_Orderable %>" />


You must have the a resource named Page_Property_Orderable in your String.resx file.

If you are in need to localize JavaScript content (when the code is inline on the ASP.NET markup), see Rick Strahl's blog post on the subject.

No comments: