Reputation: 998
I have created resx file in Content Folder where this is available for model but when I tried to access it from view it doesn't show up.
Folder structure like below:
Where I am trying to access the data like this:
<p>@Resources.Resources.lblHomeDesc1</p>
But it doesn't render the data and settings are CustomTool=PublicResXFileCodeGenerator, BuildAction=Embedded Resource
.
How to use resx file data in MVC view? Does we need to add reference in web.config? Is there something else I am missing to add?
Upvotes: 0
Views: 685
Reputation: 998
I have achieved the by creating new folder for Resource files folder structure below :
and updated Custom Tool Namespace = Resources
.
Upvotes: 0