Insert resource into submit value
I want to localize a Submit button in an ASP.NET MVC application, but don't know how to inerpolate it into a value attribute.
<input type="submit" value="Resources.Global.Create" />
It prints Resources.Global.Create over the form, but it should print the localized value, not the variable name.
+3
Ivan Bishevats
source
to share
1 answer
You are missing the magic Razor ( @
) symbol :
<input type="submit" value="@Resources.Global.Create" />
+4
Golfwolf
source
to share