共用方式為


HttpHandlersSection.Handlers 屬性

定義

取得 HttpHandlerActionCollection 物件所包含之 HttpHandlerAction 物件的 HttpHandlersSection 集合。

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

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 建構,可讓您輕鬆存取它所包含的處理常式。 這是處理組態檔專案的常見模式。

適用於

另請參閱