The previous example used a resource called WarningColor. This resource was local to the page, but in all probability, the same resource should be available throughout the application. For this reason, ASP.NET supports global resources. Global resources are available globally throughout an ASP.NET application. To change the previous example to use a global WarningColor resource, start by adding an App_GlobalResources folder. In Solution Explorer, right-click the Web site, and select Add, Add ASP.NET Folder, App_GlobalResources. Add a new resource file to this new folder and call the resource file GlobalColors.resx. Add a new entry for WarningColor with a value of Red. Select the button and open the Expressions property from the Properties Window. Change the ClassKey to GlobalColors (see Figure 5.10). Figure 5.10. Assigning a Global Explicit Expression to a PropertyThe button's BackColor property is changed to this: BackColor="<%$ Resources:GlobalColors, WarningColor %>" |