How to fetch value from resource file inside JavaScript in ASP.net MVC view using Razor

javascript, jquery, razor

Solution

$('#erroremptype').html = '@Resources.ErrorMessage';

Problem

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

Original source