Using Explicit Resource Expression and Shared Resources

Last post 05-12-2008 11:42 AM by gotdablues. 0 replies.

Sort Posts:

  • Using Explicit Resource Expression and Shared Resources

    05-12-2008, 11:42 AM
    • Loading...
    • gotdablues
    • Joined on 11-16-2005, 8:46 AM
    • Posts 14

     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 

Page 1 of 1 (1 items)
Microsoft Communities
Page view counter