The resource object with key 'InvalidUserName' was not found

J

Jeff

hey

asp.net 3.5

I'm trying to localize a requiredFieldValidator, but I get this compile
error:
The resource object with key 'InvalidUserName' was not found

The resource 'InvalidUserName' exists in .resx files in this project

Project have 2 .resx files:
WebResources.resx
WebResources.nb-NO.resx

<globalization uiCulture="nb-NO" />

When I created these resource files, I first created the
WebResources.nb-NO.resx and then the WebResources.resx. I'm not sure the
order I created these files should have anything to do with the error. (I'm
a newbie).....

Here is the markup where I try to use the InvalidUserName key:
<asp:RequiredFieldValidator ID="rfvUserName" SetFocusOnError="true"
ErrorMessage='<%$ Resources:Resource, InvalidUserName %>'
ControlToValidate="UserName" Display="Dynamic"
ValidationGroup="PasswordRecovery1" runat="server"
>*</asp:RequiredFieldValidator>

any suggestins?
 

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,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top