HttpModulesSection.Modules Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the HttpModuleActionCollection of HttpModuleAction modules contained by the HttpModulesSection.
public:
property System::Web::Configuration::HttpModuleActionCollection ^ Modules { System::Web::Configuration::HttpModuleActionCollection ^ get(); };
[System.Configuration.ConfigurationProperty("", IsDefaultCollection=true)]
public System.Web.Configuration.HttpModuleActionCollection Modules { get; }
[<System.Configuration.ConfigurationProperty("", IsDefaultCollection=true)>]
member this.Modules : System.Web.Configuration.HttpModuleActionCollection
Public ReadOnly Property Modules As HttpModuleActionCollection
Property Value
A HttpModuleActionCollection that contains the HttpModuleAction objects, or modules, defined by the HttpModulesSection.
- Attributes
Examples
The following code example shows how to access the HttpModuleAction modules.
// Get the modules collection.
HttpModuleActionCollection httpModules = httpModulesSection.Modules;
// Read the modules information.
StringBuilder modulesInfo = new StringBuilder();
for (int i = 0; i < httpModules.Count; i++)
{
modulesInfo.Append(
string.Format("Name: {0}\nType: {1}\n\n", httpModules[i].Name,
httpModules[i].Type));
}
' Get the modules collection.
Dim httpModules As HttpModuleActionCollection = httpModulesSection.Modules
' Read the modules information.
Dim modulesInfo As New StringBuilder()
For i As Integer = 0 To httpModules.Count - 1
modulesInfo.Append(String.Format("Name: {0}" + vbLf + "Type: {1}" + vbLf + vbLf, httpModules(i).Name, httpModules(i).Type))
Next
Remarks
The collection returned by this method does not refer to any actual element in the underlying configuration file. It is an ASP.NET infrastructure construct that allows easy access to the modules it contains. This is a common pattern for handling the elements of a configuration file.
Applies to
See also
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기