473,549 Members | 2,346 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.re sx" 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_Sta rt(Object sender, EventArgs e)
{
Application["CM"] = new
ResourceManager ("strings",Asse mbly.GetExecuti ngAssembly());
}

I've added the following code to my app:

ResourceManager rm = (ResourceManage r) Application["CM"];
dgResults.Colum ns[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.resour ces" was
correctly embedded or linked into assembly "AppName". baseName: strings
locationInfo: <null> resource file name: strings.resourc es assembly:
AppName, Version=1.0.143 1.19005, Culture=neutral , PublicKeyToken= null "

Any suggestions or good articles would be appreciated.
Thanks

John
Nov 18 '05 #1
1 1584
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.as p

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
2102
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 project contains its own reader class and resource .resx file from where a string or image is read. Can someone tell me what I need to do to get...
0
1467
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 run the program from VS2005. This does not work because the debugger seems not find the resource files, and I keep getting the following error: ...
2
6473
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" CA1303 : Microsoft.Globalization : Form1.btnGenerateDocuments_Click(Object, EventArgs):Void passes a literal as parameter 2 of a call to...
1
1264
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 "Assembly resource files are preferred for use with localized data that is not tied directly to the user interface such as message box text" My...
2
2000
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 for all my text on my website seems like the best way to go. I would just have a fr.resource file for each language. This seems like it would work...
2
6512
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 labelcaptions, texts for messageboxes, etc... stored, so when the user chose for an interface in English all menu's etc.. were in English...
0
1523
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. My need is to open a solution programmatically, select a Project within, and get a source resource file. Then, select a number of cultures and create...
1
6990
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 in /resources I then started to add declarative code to the web forms to controls such as buttons and labels, as follows: <asp:Label...
1
1732
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 here's the case: I'm interested in sending the email in the language chosen by the user.
0
7546
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7471
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7740
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7985
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7830
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
3517
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3496
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1082
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
784
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.