Using Resources in Asp.Net 2.0. Problem.

M

Miguel Dias Moura

Hello,

I am trying to use my resources, in an Asp.Net 2.0 web site, but I am
having a few problems.

1) Using with an Image
I have an ASP:Image (ID=MyImage) in my aspx code.

In my aspx.vb code I placed the following code:
MyImage = Resources.Global.MyImage

I get the error:
Value of type 'System.Drawing.Bitmap' cannot be converted to
'System.Web.UI.WebControls.Image'.


2) Retrieving its URL
Very often I use commercial control where I need to define an Image
URL.

Here is an example:
something.Image.URL = "assets/images/MyImage.jpg"

What I need to do is get the URL of my image:
something.Image.URL = [URL of resource MyImage]

Could someone explain how to solve these 2 problems?
I have been looking around but I was not able to find the solution.

Thanks,
Miguel
 

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

Members online

No members online now.

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,710
Latest member
bernietqt

Latest Threads

Top