Click here to Skip to main content
15,310,682 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
hello
In my application there is one class library project and one website.
I create a resource file in class library and modifier of it is public.

I need to use this resource in website layer but i giv error.

ASP.NET
<asp:Label ID="Label2" runat="server" Text="<%$ Resources:resourceName, ErrorEmptyName %>"></asp:Label>


error:
C#
The resource object with key 'ErrorEmptyName ' was not found.	


but in code page i access this key:
Label1.Text = resourceName.ErrorEmptyName;
and no error.

my resource file for me is a file with resx extention.

What is wrong?how do it?

Thank you in advance.
Posted
Updated 6-Dec-15 7:06am
v3
Comments
DotNetSteve 6-Dec-15 14:24pm
   
Did you try including the namespace? You can either have like an include on the top or in the line of code. NameSpace.Resources
NewWebDesigner 7-Dec-15 2:33am
   
yes i did it but error occure.
Do i need to create an expression builder?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900