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
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