Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Resources

Reply
Thread Tools

Resources

 
 
Heinrich Moser
Guest
Posts: n/a
 
      03-24-2008
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
 
Reply With Quote
 
 
 
 
George Ter-Saakov
Guest
Posts: n/a
 
      03-24-2008
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.


"Heinrich Moser" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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



 
Reply With Quote
 
 
 
 
Cowboy \(Gregory A. Beamer\)
Guest
Posts: n/a
 
      03-24-2008
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.

--
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!
|
*************************************************
"Heinrich Moser" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
py2app question: Resources/Python -> Resources/lib/python2.4 Russell E. Owen Python 0 09-08-2006 08:08 PM
RE: HELP HELP NETWORKING RESOURCES =?Utf-8?B?VHlyZW1hbg==?= Wireless Networking 1 11-02-2004 12:15 AM
RE: HELP HELP NETWORKING RESOURCES =?Utf-8?B?cmVh?= Wireless Networking 0 08-01-2004 03:31 PM
HELP HELP NETWORKING RESOURCES Wireless Networking 0 07-30-2004 02:12 PM
access to resources on wireless network =?Utf-8?B?d2FuZGFtYQ==?= Wireless Networking 1 07-24-2004 05:11 PM



Advertisments