Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / March 2008

Tip: Looking for answers? Try searching our database.

Resources

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Heinrich Moser - 24 Mar 2008 17:32 GMT
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

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.