Difference between these two ways of localizing a string in an aspx/ascx file?

Posted by Brandon on Stack Overflow See other posts from Stack Overflow or by Brandon
Published on 2010-05-21T14:57:58Z Indexed on 2010/05/23 4:40 UTC
Read the original article Hit count: 202

Filed under:
|
|

When I started localizing a website the first time, I just did the localization like this:

<%= Resources.ResourceFile.ResourceName %>

and it seems to work perfectly fine. However, the ReSharper 5.0 Beta does it like this:

<asp:Localize Text="<%$ Resources: ResourceFile, ResourceName %>" runat="server">
  Value
</asp:Localize>

Does it matter which way it gets done? If it doesn't matter, is there any way to make ReSharper do it the way I'm doing it? I kind of prefer it this way since it is less text in the aspx/ascx files.

© Stack Overflow or respective owner

Related posts about c#

Related posts about localization