Hi Olivier,
Welcome to ASPNET newsgroup.
As for the accessing resource strings in global resource files, we can also
make it in the inline aspx databinding expression. For example:
<asp:Label ID="ColumnCurrency" runat="server" Text='<%#
(string)GetGlobalResourceObject("CurrencyNames",(s tring)Eval("Region")) %>'
meta:resourcekey="LabelResource4"></asp:Label>
Here is related the reference on MSDN 2 site:
http://beta.asp.net/QUICKSTART/util/.../samples/local
ization/LocalizeImpExp.src&file=LocalizeImpExp_cs\Localize ImpExp_cs.aspx
Hope helps. Thanks,
Steven Cheng
Microsoft Online Support
Get Secure!
www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| From: "Olivier Matrot" <ol****************@online.nospam>
| Subject: ASP.NET 2.0 : Explicit localization expression
| Date: Thu, 25 Aug 2005 17:00:36 +0200
| Lines: 20
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
| X-RFC2646: Format=Flowed; Original
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
| Message-ID: <#Y**************@TK2MSFTNGP11.phx.gbl>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: reverse.completel.net 213.30.138.178
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP11.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.framework.aspnet:120270
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| Hello,
|
| I'm trying to use explicit localization expression to access global
| resources from an .inc file that's included into several ASPX pages.
|
| I may be wrong in my expression, bu accessing Local resources is working
| well indeed. Here is the code :
|
| ....
| <asp:Localize runat="server" id='myid' text="<% $ Resources
| sharedStrings,title_inc%>">some text</asp:Localize>
| ....
|
| Where 'sharedstrings' is the name of a global resource file and
'title_inc'
| is the string Name.
| In the resource file, we could find a string named "title_inc.Text".
|
| TIA.
|
|
|