What is Resource File?

Types of Resources

There are two types of resources

  1. Local Resources
  2. Global Resources

Local Resources

Generating Default Resource File

Generating Resource Files for Other Cultures

In Solution Explorer

Testing Resource Files for Other Culture

ASP.NET automatically determines the user's preferred culture based on information provided by the Web Browser. To test other culture we need to update the preferred language in Web Browser as

Global Resources

Generating Global Resource File

Working with Resources in Web Pages

Resource files are used in ASP.NET

To use resource to set control's property values, we can use

Implicit localization

Explicit localization

Localizing Static Text

Retrieve Resource Values Programmatically

Editing Resource Files after publishing in ASP.NET 2.0

The beauty of the resource file in ASP.NET 2.0 is modifying the resource file after the application is deployed on a server without re-compiling the entire application itself.

But the ability to do so depends on what project model we have followed for Web application in VS 2005

Project Model- Website Project Model (Default in VS2005)

Project Model- Web Application Project(WAP)

Note: