Reputation: 13412
I use the localization paradigm of one resx file per view in all my projects. I have two identical folder structures for Resources and Views and I link the resource and the view like so:
@using Res = [Namespace].Resources.[Controller].[View]
<p>@Res.[ResourceKey]</p>
Is it possible to get asp.net to use/link the resource file without the using statements and defining a Custom Tool Namespace
for all my Resx files? (Yes, I am that lazy.)
Upvotes: 2
Views: 661
Reputation: 13381
Open your web.config
in your Views folder.
Add the namespace for your resources.
Restart VS as it doesn't pick up the namespace so it's not showing intellisense.
Call your resources from any view without adding using
statements inside your *.cshtml
files.
Upvotes: 1