Hi!
What are the advantages/disadvantages of using
<p><%= Resources.MyGlobalResourceFile.HelloWorld %></p>
as compared to
<p><asp:Localize runat="server" Text="<%$ Resources:MyGlobalResourceFile, HelloWorld %>" /></p>
Both seem to do quite the same. The documentation seems to recommend
the second one, although the first one looks more elegant to me (less
code, less server-side controls, IntelliSense auto-completion).
Are the any good reasons to favor one over the other? (Assuming that
it is not necessary to change this value in code...)
Greetings,
Heinzi
George Ter-Saakov - 24 Mar 2008 17:46 GMT
Second creates the whole object Localize and first does not do it.
So I would use first since it's more efficient.
The second way is more object oriented and support more options like
Theming...
George.
> Hi!
>
[quoted text clipped - 16 lines]
> Greetings,
> Heinzi
Cowboy (Gregory A. Beamer) - 24 Mar 2008 18:08 GMT
The main advantages of the second is that it is consistent with other
globalization strings. It is also recommended, which suggests it will be
supported for a long time, although I doubt MS will get rid of simple
binding. Another advantage is server side control, although it is rare you
will want to dink around with resource rendering. The Localize control can
also do other globalization/localization tasks, but that is not a big issue
with resources files, at least not over all.

Signature
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA
Subscribe to my blog
http://gregorybeamer.spaces.live.com/lists/feed.rss
or just read it:
http://gregorybeamer.spaces.live.com/
*************************************************
| Think outside the box!
*************************************************
> Hi!
>
[quoted text clipped - 16 lines]
> Greetings,
> Heinzi