HttpModuleAction.Type 属性

定义

获取或设置模块类型。

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

属性值

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,然后在系统程序集缓存中搜索。

适用于