Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles
(untagged)

How to use RESX files

0.00/5 (No votes)
7 May 2010 1  
Quite simple, but first I didn't know how to use it :) ASP.NET controlsHTML controls In JavaScriptSetTextForLabelOne(prefix, '');AdminUI is my resources file (AdminUI.resx) and the first argument...
Quite simple, but first I didn't know how to use it :)


ASP.NET controls

<asp:label id="lblResult" runat="server" text="<%$ resources:AdminUI, Users.Result %>" cssclass="resultLabel" xmlns:asp="#unknown"></asp:label>


HTML controls

<option value="greatthan">
                            <asp:literal id="Literal3" runat="server" text="<%$ resources:AdminUI, NumericalControl.GreatThanTitle %>" xmlns:asp="#unknown"></asp:literal>
                        </option>


In JavaScript

SetTextForLabelOne(prefix, 
            '<asp:literal id="Literal6" runat="server" text="<%$ resources:AdminUI, NumericalControl.From %>" xmlns:asp="#unknown" />');



AdminUI is my resources file (AdminUI.resx) and the first argument is resource key

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here