1. Adding Images to the solution.
Add images to the soution.
Right click the image and set the Build action to "Embeded Resource".
2. Declaring the image to be a web resource
Add the following line to the assemblyinfo.cs
[assembly: WebResource("
3. Access the file in the code
Page.ClientScript.GetWebResourceUrl(this.GetType(), "
Done... you can now embed the images, .js files or .css files to the dlls.
This article also appears on Experts Exchange Embeded Resources in dlls
No comments:
Post a Comment