ASP.NET 2.0 resource trouble

Discussion in 'ASP .Net' started by schneider@rehm.de, Mar 29, 2007.

  1. Guest

    Hi all,

    I have a website which I want to make multi-language capable. For
    this, I need to create a local resource for each .aspx page (here:
    Default.aspx). In the folder containing the page, I create the
    App_LocalResources folder in which I created the Default.aspx.resx-
    file for the aspx file. Loading and localizing resources works fine
    for text resources, but it doesn't for images.

    In Page_Load() of Default.aspx:
    Image1.ImageUrl = Page.ClientScript.GetWebResourceUrl(this.GetType(),
    "image1");

    I tried Image1.GetType() or typeof(Bitmap) instead of this.getType()
    and I tried "Default.aspx.resx.image1(.gif)" for "image1". It does not
    work. The image is not displayed. However, text loaded from the same
    resource file IS displayed.

    Is it actually possible using image resources from an
    App_LocalResources folder? Or do I have do create an extra WebResource
    project like it is described in http://www.codeproject.com/aspnet/MyWebResourceProj.asp
    ?

    Cheers, Hannes
     
    , Mar 29, 2007
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Priya
    Replies:
    0
    Views:
    441
    Priya
    Nov 25, 2003
  2. Dirc Khan-Evans
    Replies:
    1
    Views:
    1,083
    Karl Seguin
    Oct 17, 2005
  3. Fredrik Rodin
    Replies:
    2
    Views:
    5,158
    Fredrik Rodin
    Nov 4, 2005
  4. Paul Aspinall

    ASP.NET Resource kit for .NET 2.0

    Paul Aspinall, Nov 28, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    1,093
    Paul Aspinall
    Nov 28, 2005
  5. avishosh
    Replies:
    2
    Views:
    11,179
    avishosh
    Aug 8, 2004
  6. Replies:
    0
    Views:
    354
  7. Heinrich Moser
    Replies:
    1
    Views:
    621
    Heinrich Moser
    Mar 27, 2008
  8. Guest
    Replies:
    3
    Views:
    157
    thorpe
    Oct 13, 2004
Loading...