theintrepidfox
2006-03-26 08:53:00 AM


Dear Group

Just wonder if someone can point me in the right direction please?
I have a label control and want to assign a string in a resource. I'm
sure I'm on the right track but it doesn't work. The resource and
string is in place.

<asp:Label ID="LaSysNavFooter" runat="server" Text='<%#
Resources.framework.global.aspx.LaSysNavFooter%>'></asp:Label>

Thanks very much for your help & efforts!

Martin

 

Re: Referencing a resx from an aspx?

prabhupr
2006-03-27 02:09:00 AM

The way we did was

1. In the ASPx page this is how the code looks
<asp:Literal runat="server" ID="Literal2" Text="<%$
Resources:SeeAllFeaturedFeeds %>"></asp:Literal>
2. In ".cs" file, having "using System.Globalization;"
3. Create a folder "App_LocalResources" (I guess name really matters)
4. Have files name like "Default.aspx.resx",
"Default.aspx.de-DE.resx"..... The file name should match your ASPx
file name
I'm pretty sure, you can keep all resources in single file rather
than having one RESx for each ASPx file (I dont know HOW though)

Hope that helps.