resources - Best way to add a formatted localized string to an ASP.NET page? -
i've been using <asp:literal runat="server" meta:resourcekey="blah" />
resx files in app_localresources directory translatable strings, if key, blah.text
"enter {0} category", how pass parameter replace {0} in context?
i know use <%=string.format(...
seems unclean , can't access local resources in way. should use case?
an example of markup:
<asp:literal runat="server" id="blah" />
from code behind:
blah.text = string.format( "enter {0} category", getlocalresourceobject("blah").tostring() );
by using getlocalresourceobject method.
Comments
Post a Comment