I have created a shared resource file. From with my code-behind files I am able to access the strongly-typed fields with my resource.
For example, Literal1.text = MySharedResource.Properties.Resources.Username. Where Username is a key in my Resources.resx file.
However, when I try to use explicit expressions from within my aspx page, I am not able to reference the field.
For example, in my web page I have <asp:Literal id="Literal1" runat="server" text="<%$ Resources: Resources, Username %>" />. This does not work. I tried fully-qualifying the class, this does not work either. <asp:Literal id="Literal1" runat="server"
text="<%$ Resources: MySharedResource.Properties.Resources, Username %>" />
Any thoughts on how I can use a shared resource file with explicit expressions?
gotdablues
Member
12 Points
25 Posts
Using Explicit Resource Expression and Shared Resources
May 12, 2008 03:42 PM|LINK
I have created a shared resource file. From with my code-behind files I am able to access the strongly-typed fields with my resource.
For example, Literal1.text = MySharedResource.Properties.Resources.Username. Where Username is a key in my Resources.resx file.
However, when I try to use explicit expressions from within my aspx page, I am not able to reference the field.
For example, in my web page I have <asp:Literal id="Literal1" runat="server" text="<%$ Resources: Resources, Username %>" />. This does not work. I tried fully-qualifying the class, this does not work either. <asp:Literal id="Literal1" runat="server" text="<%$ Resources: MySharedResource.Properties.Resources, Username %>" />
Any thoughts on how I can use a shared resource file with explicit expressions?
Thanks.
Steve