473,503 Members | 1,953 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Resource Files & globalization

Getting resource files to work with VS2002 and ASP.Net seems to be a little
flaky. I've added a resource file "strings.resx" to the project. The
properties of the files say Build action = "embedded resource". I've added
the appropriate code to the Global.asax:

protected void Application_Start(Object sender, EventArgs e)
{
Application["CM"] = new
ResourceManager("strings",Assembly.GetExecutingAss embly());
}

I've added the following code to my app:

ResourceManager rm = (ResourceManager) Application["CM"];
dgResults.Columns[1].HeaderText=rm.GetString("Name");
This builds fine but when I try and run it I get the error:

"Could not find any resources appropriate for the specified culture (or the
neutral culture) in the given assembly. Make sure "strings.resources" was
correctly embedded or linked into assembly "AppName". baseName: strings
locationInfo: <null> resource file name: strings.resources assembly:
AppName, Version=1.0.1431.19005, Culture=neutral, PublicKeyToken=null "

Any suggestions or good articles would be appreciated.
Thanks

John
Nov 18 '05 #1
1 1578
Hi John,

Based on my research and experience, the following information is useful to
you. Please refer to it carefully.

ResourceManager and ASP.NET
http://msdn.microsoft.com/library/de...us/cptutorials
/html/resourcemanager_and_asp_net.asp

Working with Resource Files
http://samples.gotdotnet.com/quickst...urcefiles.aspx

How to read satellite assemblies resources in ASP.NET
http://www.codeproject.com/aspnet/SatResourcesDemo.asp

I hope it helps.

Best regards,

Jacob Yang
Microsoft Online Partner Support
Get Secure! ¨C www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Nov 18 '05 #2

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

Similar topics

1
2101
by: Chukkalove | last post by:
I originally created several "copy" resource reader classes which worked great individually, but after I converted them into an parent class with children they no longer find the resources. Each...
0
1463
by: GT | last post by:
This question has been posted before, but without any response so therefore I'm trying once more. I'm trying to embed .resource files into a Windows application in VS2005, and then compile and...
2
6468
by: randy1200 | last post by:
I have the following line of C# code: MessageBox.Show(filesThatDoNotExist, "Files Not Found", MessageBoxButtons.OK); This line generates the following warning when I select "Run Code Analysis"...
1
1260
by: Jason | last post by:
Greetings , I'm studying for a MS exam and I'm a little confused about assemblies. Not what they are but just a specific comment that I'm reading and it doesn't make sense to me. It reads ...
2
1997
by: Daniel | last post by:
I am just investigating on .resx and .resource files using asp.net. I am attempting to develop a webpage in Dreamweaver on an asp.net webserver. As i read around the net, using a .resource file...
2
6509
by: Screaming Eagles 101 | last post by:
Hi, we used to have a resource file in VB6 and use this as a provider according to the language a user chose (English, Dutch, Spanish,....), his interface thus. In this resource file we had al...
0
1518
by: VigneshS | last post by:
Hi, I am a newbie to Globalization and Localisation Concepts. I tried almost all the methods of the Globalization concepts. But i cannot be able to embed a text file within a Resource. ...
1
6984
by: TisMe | last post by:
Hi All, I am trying to use resource files to globalize my website application. I had this working fine, working through the API for setting page titles programatically, with the resource files...
1
1730
by: Michael | last post by:
Hi. Could anyone help me out with this one. I have a aspx page from where users may send invites to other users. When the user clicks the "send invite"-button an email is generated. Now...
0
7093
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
7287
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
7348
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...
1
7006
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
7467
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
5592
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5021
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...
0
3175
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
744
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.