I have values in a resx file that I would like to output in my razor view. When I try it this way, it blows up.
<li>
<a href="#">@ResourceFacade<Global>.GetString("MenuLabelSupport");</a>
</li>
but if I do this, it works as expected.
@{
var menuLabelSupport = ResourceFacade<Global>.GetString("MenuLabelSupport");
}
<li>
<a href="#">@menuLabelSupport</a>
</li>
I would really like to use the first implementation. Perhaps my syntax isn’t quite right? If anyone sees, that I’m doing something incorrectly, please let me know. Thank you so much for any tips or advice.
Try like this: