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. Advertising

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. Dirc Khan-Evans
    Replies:
    1
    Views:
    903
    Karl Seguin
    Oct 17, 2005
  2. Fredrik Rodin
    Replies:
    2
    Views:
    4,951
    Fredrik Rodin
    Nov 4, 2005
  3. avishosh
    Replies:
    2
    Views:
    10,584
    avishosh
    Aug 8, 2004
  4. Replies:
    0
    Views:
    301
  5. Heinrich Moser
    Replies:
    1
    Views:
    462
    Heinrich Moser
    Mar 27, 2008
Loading...

Share This Page