HttpHandlersSection.Handlers 属性

定义

获取 HttpHandlersSection 对象包含的 HttpHandlerAction 对象的 HttpHandlerActionCollection 集合。

public:
 property System::Web::Configuration::HttpHandlerActionCollection ^ Handlers { System::Web::Configuration::HttpHandlerActionCollection ^ get(); };
[System.Configuration.ConfigurationProperty("", IsDefaultCollection=true)]
public System.Web.Configuration.HttpHandlerActionCollection Handlers { get; }
[<System.Configuration.ConfigurationProperty("", IsDefaultCollection=true)>]
member this.Handlers : System.Web.Configuration.HttpHandlerActionCollection
Public ReadOnly Property Handlers As HttpHandlerActionCollection

属性值

包含 HttpHandlerActionCollection 对象或处理程序的 HttpHandlerAction

属性

示例

下面的代码示例演示如何访问 HttpHandlerAction 处理程序。

// Get a HttpHandlerAction in the Handlers property HttpHandlerAction collection.
HttpHandlerAction httpHandler = httpHandlers[0];
' Get a HttpHandlerAction in the Handlers property HttpHandlerAction collection.
Dim httpHandler As HttpHandlerAction = httpHandlers(0)

注解

Handlers此方法返回的属性集合不引用基础配置文件中的任何实际元素。 它是一个 System.Web.Configuration 构造,允许轻松访问它包含的处理程序。 这是处理配置文件元素的常见模式。

适用于

另请参阅