Embedded Resources in ASP.NET

What is meant by embedded resources in ASP.NET? What are the advantages of using the same?

Questions by pritamde   answers by pritamde

Showing Answers 1 - 2 of 2 Answers


  • Jan 1st, 2010

The ability to make the file or image accessible from your server control’s assembly.
By this way, We can put related javascript/image all togather to avoid deployment problem

  Was this answer useful?  Yes

Embedding resource is the way using which we can deploy the image file or javascript file as the part of assembly. These files can then be easily accessed without having to worry about deployment issues.

The image files that needs to be added in the assembly, should be configured in Assesmblyinfo.cs file, [assembly: System.Web.UI.WebResource("abc.gif", "img/gif")]

To access these resource file from code, we can write,
theImage.ImageUrl = Page.ClientScript.GetWebResourceUrl(this.GetType(), "myImage.gif");

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.


Related Answered Questions


Related Open Questions