Home All Groups Group Topic Archive Search About

How to use an image resource in Asp.Net 2.0? Please need help. Thank You.

Author
20 Jan 2006 1:39 PM
Miguel Dias Moura
Hello,

I created MyPage.aspx and MyPage.aspx.vb in VS2005.
I also added a few images to the local resource file MyPage.aspx.resx

I added an asp:Image to MyPage.aspx with ID="MyImage".
I need to set in my VB code in MyPage.aspx.vb the following:
  MyImage = Resource("MyImage.jpg")

How can I do this?
Basically all I need is to link an asp:Image to an image resource.

I have been looking everywhere for how to link controls in my pages to
their correspondents in the resource files but I havent's been able.
All I could do was to use String Resources.

Thank You Very Much,
Miguel

AddThis Social Bookmark Button