473,397 Members | 1,961 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

Steps to use resource files in Visual Studio.NET

I am just trying to get the simplest resource file working using Visual
Studio.NET 2003. Since every aspx file has a .resx file associated with it,
I just added a key called "test" to it and am using the code below to try
and access it. However, I get an error messege executing the program

[Could not find any resources appropriate for the specified culture (or the
neutral culture) in the given assembly. Make sure
"TestCustomControls.WebForm1.aspx.resources" was correctly embedded or
linked into assembly "x6vnwcv5".]

Is my Code Correct?
Did my resource file get compiled?
If not, Can it be compiled from VS.NET 2003?

Thanks for your help

Earl

private void Button1_Click(object sender, System.EventArgs e)

{

ResourceManager rm = new ResourceManager("TestCustomControls.WebForm1.aspx" ,
this.GetType().Assembly);

Literal1.Text = rm.GetString("test");

}
Nov 17 '05 #1
1 1381
I got it...

The Assembly uses on the part before the first period for its resource
name...so this is the corrected code...

ResourceManager rm = new ResourceManager("TestCustomControls.WebForm1",
this.GetType().Assembly);
Earl

"Earl Teigrob" <ea******@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
I am just trying to get the simplest resource file working using Visual
Studio.NET 2003. Since every aspx file has a .resx file associated with it, I just added a key called "test" to it and am using the code below to try
and access it. However, I get an error messege executing the program

[Could not find any resources appropriate for the specified culture (or the neutral culture) in the given assembly. Make sure
"TestCustomControls.WebForm1.aspx.resources" was correctly embedded or
linked into assembly "x6vnwcv5".]

Is my Code Correct?
Did my resource file get compiled?
If not, Can it be compiled from VS.NET 2003?

Thanks for your help

Earl

private void Button1_Click(object sender, System.EventArgs e)

{

ResourceManager rm = new ResourceManager("TestCustomControls.WebForm1.aspx" , this.GetType().Assembly);

Literal1.Text = rm.GetString("test");

}

Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: | last post by:
When do they plan on making this essential utility USEFUL? In its current form its pointless. How could they let this out? Its useless.
2
by: JollyK | last post by:
Hello friends, In a large asp.net project, I don't think it is a good idea for having one common resource file containing all localized strings for the whole application. I think a better...
3
by: Jules | last post by:
i'm working with translators that just want to translate "web pages" and not deal with resource files. i'd like to have a file structure that looks sort of like this: / <- root directory where...
5
by: Jack Russell | last post by:
I am looking at "internationalising" a project. I can understand resource files, creating them etc. However the drawback with them seems to be you need to use Visual Studio to create and...
0
by: Kleanthis | last post by:
I have a problem, when deploying multilingual applications using cab files on Compact Framework 2.0. It seems that something is going wrong with compact framework 2.0 Below I have a description...
2
by: Nikolay Belyh | last post by:
1. Why does Visual Studio 2008 started ignoring //{NO_DEPENDENCIES} in resource.h? If I edit file "resource.h" _manually_, it rebuilds the whole solution. It worked just fine with Visual Studio...
8
by: raylopez99 | last post by:
I have the latest version of Visual Studio 2008 Professional, which allows you to create resource files (this is the .resx file, no?), unlike the Express version, which does not. I am trying to...
7
by: Ivan | last post by:
Hello group. Here is what I like to do. #1. Add ".SQL" file to project #2. Being able to load contents of this file into string variable. So, I want .SQL to be compiled into executable and...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.