IResourceUrlGenerator Интерфейс
Определение
Определяет метод, который должен реализовывать сайт конструктора, чтобы предоставить поиск ссылки URL-адреса для внедренных ресурсов.Defines the method that a designer-host must implement to provide URL reference look-up for embedded resources.
public interface class IResourceUrlGenerator
public interface IResourceUrlGenerator
type IResourceUrlGenerator = interface
Public Interface IResourceUrlGenerator
Комментарии
ASP.NET версии 2,0 предоставляет возможность извлечения внедренных ресурсов из сборки для элементов управления, таких как элемент управления Page.ASP.NET version 2.0 provides the ability to retrieve embedded resources from an assembly for controls, such as the Page control. Во время выполнения URL-адрес внедренного ресурса можно получить с помощью метода GetWebResourceUrl класса ClientScriptManager.At run time, the URL to the embedded resource can be retrieved using the GetWebResourceUrl method of the ClientScriptManager class. Чтобы обеспечить время разработки для создания URL-адреса ресурса из сборки, узлы конструктора могут предоставлять службу, реализующую интерфейс IResourceUrlGenerator.To provide a design-time means for generating a resource URL from an assembly, designer hosts can offer a service that implements the IResourceUrlGenerator interface. Дополнительные сведения:For more information:
Сведения об использовании ресурсов в локализации см. в разделе ASP.NET Web Page Resources Overview.On using resources in localization, see ASP.NET Web Page Resources Overview.
Сведения об использовании внедренных ресурсов см. в разделе . Используйте ресурсы для установки значений свойств в серверных веб-элементах управления и способах: Извлеките значения ресурсов программным способом.On using embedded resources, see How to: Use Resources to Set Property Values in Web Server Controls and How to: Retrieve Resource Values Programmatically.
Сведения о конструкторах элементов управления см. в разделе ASP.NET Control Designers Overview.On control designers, see ASP.NET Control Designers Overview.
В интерфейсе IResourceUrlGenerator есть один метод, метод GetResourceUrl, который возвращает ссылку на URL-адрес ресурса с учетом типа и имени ресурса.The IResourceUrlGenerator interface has one method, the GetResourceUrl method, that returns a URL reference to a resource given the resource type and name.
Методы
GetResourceUrl(Type, String) |
Возвращает ссылку URL-адреса для внедренного ресурса в сборке, которая используется на этапе разработки.Returns a URL reference to an embedded resource in an assembly that is used at design time. |