In any case, you can then access resources programmatically through the Resource Manager class.
Note You can also add resources as text files to the application.
To make changing those strings and images in the program as easy as possible without having to go through the entire source code and search for them, you can put them in separate files and change them in only one place. NET Framework and the CLR offer great support for this approach through embedded resources.
You can put every string, image, and other type of data that should not exist directly in source code in separate resource files.
Because more and more companies are reaching international markets through the Internet,supporting different cultures through your applications is essential for being successful. NET Framework comes with an integrated infrastructure for creating international applications. NET applications and for creating international ASP.
Basically, the CLR supports a mechanism for packaging and deploying resources with any type of application. NET Framework come with several classes for managing and accessing resources in applications. NET applications based on embedded resources and the integrated localization support. NET Applications Usually, applications use a number of images and strings for purposes such as toolbar or menu icons, menu captions, and label captions.
These resource files are just XML files containing either string values or references to external files.
Changing those strings and images can get really ugly if you put them directly in the source code.These text files consist of key/value pairs, one per line, in the format key = value.They can be compiled with the tool into a binary format with the file extension .resources.Usually, these resources are compiled into the binaries of the application itself.Therefore, they are automatically deployed with the application, and no extra deployment steps are necessary.While going through the following web application sample, you will learn how you can use resources both for populating control properties and for getting some other information such as document templates for report generation.The web application requires users to enter their first name, last name, and age.The primary use case for resources is localization.Using resources, you can define values for control properties (such as the text of a Label control) in different resource files-one for each culture the application supports.It retrieves the results through the method specified in the Method Name property.You will see the implementation of this method later in this chapter. Finally, all strings, as well as the XML and XSLT templates, are embedded resources.