AspNet 2.0 Resource file naming problem.

  • Thread starter Miguel Dias Moura
  • Start date
M

Miguel Dias Moura

Hello,

I know that in Asp.Net 2.0 the file MyResources.resx is for en-US and is
the base file.
For example, MyResources.fr-FR.resx is for french culture.

My questions are:

1. How to I set my base file to be named "MyFile.resx" and use fr-FR as
the base culture.

2. I read in a book that the resource file for a page should be named
"pagename.aspx.resx"
Should I call the other culture files something like
"pagename.aspx.fr-FR.resx"?

3. I tried, in mypage.aspx.vb, to access and object in mypage.rex (I
also tried mypage.aspx.resx)
I added the resource using Visual Studio. The resource is name
"MyImage" and is an image.

I used the code from an MSDN example:

'---------------
Dim rm As ResourceManager

' Create a Resource Manager instance.
rm = ResourceManager.CreateFileBasedResourceManager("mypage", ".",
Nothing)

' Retrieve the Image from MyResource by using the GetObject method.
myImage = rm.GetObject("MyImage")
'---------------

NOTE: myImage is an Asp:Image server control on my page.

I get the error:

Could not find any resources appropriate for the specified culture
(or the neutral culture) on disk.
baseName: mypage locationInfo: <null> fileName: mypage.resources


What am I doing wrong?

Thank You,
Miguel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,708
Latest member
SherleneF1

Latest Threads

Top