ASP.NET 2.0 resource trouble


S

schneider

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
 
Ad

Advertisements


Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top