4

Currently I am using this hard code to store a message.

$('#erroremptype').html = "Please select employee type";

Now I need to change it. I have created a resource file and store key value.

How can I get the value from the resource file and replace it with $('#erroremptype').html

In my .resx file I have Name: Error Message Value: Please select employee type

1 Answer 1

2
$('#erroremptype').html = '@Resources.ErrorMessage';
Sign up to request clarification or add additional context in comments.

3 Comments

Are you getting any error, when you write my suggestion?
Resource file is not getting reffered!
maybe you need the namespace something like : @YourApp.Resources.ErrorMessage

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.