Article ID: 910445 - View products that this article applies to.
ASP.NET Support Voice Column
How to embed resources in ASP.NET 2.0 assembliesTo customize this column to your needs, we want to invite you to submit your ideas about topics that interest you and issues that you want to see addressed in future Knowledge Base articles and Support Voice columns. You can submit your ideas and feedback using the Ask For It
(http://support.microsoft.com/common/survey.aspx?scid=sw;en;1176&p0=&p1=&p2=&p3=&p4=)form. There's also a link to the form at the bottom of this column.
IntroductionHi, this is Karthik with the Microsoft ASP.NET developer support team here at Microsoft. I have been working with ASP.NET for the past year and a half and have been involved with software development for about eight years now. The concept of embedding resources in assemblies that I discuss in this article is a pretty cool one. This could be very useful in large Web applications that involve lots of reusable components.
In this article, I will talk about and provide step-by-step instructions for creating and using embedded resources.
What are these resources?These resources could be any resources that you need for proper display, functioning, validation, and execution of the components in your project. These are vital resources that tend to and need to stay consistent across the application.
What are the advantages of embedding them?You could put all your dependencies into one single assembly and then ship the assembly out to whoever needs it without having to worry about stuff like does the user has the latest client-side scripts? Did the user remember to put the images in the /something/something/images folder? Did the user set the permissions for the new folder accordingly? Is there any conflict between the resources that my library requires and any other library? Well, the list could go on.
Embedding the resources in an assemblyTo do this, follow these steps:
ReferencesFor more information about the ClientScriptManager class, visit the following Microsoft Developer Network (MSDN) Web site:
The following MSDN Web site describes the factors you should consider when you design assemblies:
http://msdn2.microsoft.com/en-us/library/ms189566.aspxAssemblies (.NET Framework Developer's Guide)
Assemblies are the building blocks of Microsoft .NET Framework applications. They form the fundamental unit of deployment, version control, reuse, activation scoping, and security permissions. For more information, visit the following MSDN Web site:
http://msdn2.microsoft.com/en-us/library/hk5f40ct(vs.71).aspxAs always, feel free to submit ideas on topics you want addressed in future columns or in the Knowledge Base using the Ask For It
Article ID: 910445 - Last Review: May 11, 2007 - Revision: 1.3
Retired KB Content Disclaimer
This article was written about products for which Microsoft no longer offers support. Therefore, this article is offered "as is" and will no longer be updated.