Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Resource Files & globalization

Reply
Thread Tools

Resource Files & globalization

 
 
John Stemper
Guest
Posts: n/a
 
      12-02-2003
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


 
Reply With Quote
 
 
 
 
Jacob Yang [MSFT]
Guest
Posts: n/a
 
      12-03-2003
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.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Resource expression to access resource located in library Heinrich Moser ASP .Net 1 03-27-2008 04:25 PM
Very annoying error: Access to the path is denied. ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity Jay ASP .Net 2 08-20-2007 07:38 PM
Resource manager problem: naming for embedded resource. Dirc Khan-Evans ASP .Net 1 10-17-2005 12:52 PM
The system cannot locate the resource specified. Error processing resource avishosh XML 2 08-08-2004 06:28 AM
Nasty bug in documentation regarding globalization - wrong Culture Info name for Serbian (Cyrilic) Dejan Vesic ASP .Net 1 07-03-2003 12:32 AM



Advertisments