Click here to Skip to main content
Click here to Skip to main content

How to use RESX files

By , 7 May 2010
 
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, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

Pavel Yermalovich
Software Developer (Senior)
Belarus Belarus
Member
Software developer with over 3 years of extensive experience in analysis, design and development. Recently, most interested in refactoring and design patterns applied to .NET Framework.
 
Core technologies I am using: OOP, OOD, DDD, TDD, N-tier applications, enterprise development.
 
Certificates:
Brainbench: .NET Framework 3.5 Fundamentals, Data Modeling Concepts, Web Design Concepts, C#
 
Microsoft: Exam 70-526: TS: Microsoft .NET Framework 2.0 - Windows-Based Client Development
 
INTUIT.RU: Development of Web-application ASP. NET Using Visual Studio. NET, Web applications in ASP.NET, Microsoft .NET Framework Distributed Applications Development.
 
Specialties
NET Framework : 2.0, 3.5, 4.0
Languages and technologies: C#, ASP.NET MVC 2, ASP.NET MVC 3, WCF, ASP.NET 4.0, Web Services, ADO.NET, LINQ, Entity Framework, NHibernate 3.0, JavaScript, HTML, CSS, XML, Ajax
RDBMS : SQL Server 2005, 2008, 2008 R2, MS Access.
Reporting: MS SQL Reporting Services, Crystal Reports

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
Hint: For improved responsiveness ensure Javascript is enabled and choose 'Normal' from the Layout dropdown and hit 'Update'.
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page   
-- There are no messages in this forum --
Permalink | Advertise | Privacy | Mobile
Web03 | 2.6.130523.1 | Last Updated 7 May 2010
Article Copyright 2010 by Pavel Yermalovich
Everything else Copyright © CodeProject, 1999-2013
Terms of Use
Layout: fixed | fluid