Why does $ Resources: wss work in the web control but $ Resources: core is not?

When my ascx web control has the following:

<asp:Literal runat="server" Text="<%$Resources:core,Description%>" /> 

I get this error: The resource object with the key "Description" was not found.

But when I change Literal to:

 <asp:Literal runat="server" Text="<%$Resources:wss,viewlsts_desc%>" /> 

The control looks great.

What is so special about the wss resource file? How can I use the kernel?

Update:

I still don't know why, but it looks like the resource files in 14 \ CONFIG \ Resources are available, but the files in 14 \ Resources are not.

+4
source share
1 answer

I highly recommend SharePoint Resources, Types, Usage, and Deployment , which details the differences between the types of SharePoint resources. This is about SharePoint 2007, but I think nothing has changed in this area (except that 14 is the new 12).

Resource allocation resources are located at 12 hive in .. \ 12 \ Resources. In WSS, the default initialization resource is the core.resx file. This file is used in site definition files (one.xml), functions, list definitions, etc.

[...]

However, resource initialization files are not available from ASP.NET Web sites. . This is where runtime resources come into play. These files are used in vanilla ASP.NET sites and are located on the Internet application folder under .. \ WSS \ VirtualDirectories [port] \ App_GlobalResources. They are automatically compiled .Net in Resource Namespace. These resources are available in assemblies and directly in ASPX pages. To access them from the code, it uses strongly typed Resources notation. [File prefix]. [Resource. name]. On ASPX pages, use the explicit expression <% $ Resources: [filename prefix,] resource key%>. By default, the WSS resource file in this category, used by all WSS objects, wss.resx .

+5
source

All Articles