Author: Synthetikk242 | Posted on: 1/13/2009 8:46:20 PM | Views : 638

I've build a custom control, and i've added images to the project that are embedded resources, only thing is, GetWebResourceUrl() isn't accessing them..

here's what i've done.

Created a new Project
1) Added an image called MyImage.jpg to a folder in the project called "Images"
2) Changed the Build Action to "Embedded Resource"
3) Added this to AssemblyInfo.cs
[assembly: System.Web.UI.WebResource("<MyNameSpace>.Images.MyImage.jpg", "img/jpeg")]
4) Access it like this:
string colorFunctions = Page.ClientScript.GetWebResourceUrl(this.GetType(), Go to the complete details ...