I am creating one application in which I am using resource files to keep strings. In my application I am keeping pages in separate folders like all the registration pages are in Register folder. I created on Resources folder in this folder to have all the resource files related to registration module. But, when I am trying to access resource strings
<asp:Label Text="<%$Resources: RegisterAsUser, userName%>" runat="server" />
It is giving error that userName key is not found. I am not able to figure out the error here.
Can anyone tell what is wrong here?
Thanks,
Ashwani
You are using explicit expressions.
whereas the other option is implicit expressions
For the explicit expressions as I understand it, the purpose of it is to used a shared location, so that resources from many aspx files can access the values from one resource file. For this to work, your resx file RegisterAsUser must be beneath the App_GlobalResources directory.
With implicit, the value is looked from in a resx file with the same name as the aspx file with the correct localization value of course.