HttpModuleAction.Type 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得或設定模組型別。
public:
property System::String ^ Type { System::String ^ get(); void set(System::String ^ value); };
[System.Configuration.ConfigurationProperty("type", DefaultValue="", IsRequired=true)]
public string Type { get; set; }
[<System.Configuration.ConfigurationProperty("type", DefaultValue="", IsRequired=true)>]
member this.Type : string with get, set
Public Property Type As String
屬性值
逗號分隔清單,其中包含模組型別名稱和組件資訊。
- 屬性
範例
下列程式碼範例示範如何存取 Type 屬性。
// Get the modules collection.
HttpModuleActionCollection httpModules2 =
httpModulesSection.Modules;
string typeFound = "typeName not found.";
// Find the module with the specified type.
foreach (HttpModuleAction currentModule in httpModules2)
{
if (currentModule.Type == "typeName")
typeFound = "typeName found.";
}
' Get the modules collection.
Dim httpModules2 _
As HttpModuleActionCollection = httpModulesSection.Modules
Dim typeFound As String = _
"typeName not found."
' Find the module with the specified type.
Dim currentModule1 As HttpModuleAction
For Each currentModule1 In httpModules2
If currentModule1.Type = "typeName" Then
typeFound = "typeName found."
End If
Next currentModule1
備註
若要尋找 所 Type 定義的元件,ASP.NET 先在應用程式的私用 \bin 目錄中搜尋元件 DLL,然後在系統組件快取中。