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
Feedback
https://aka.ms/ContentUserFeedback.
Kommer snart: I hele 2024 udfaser vi GitHub-problemer som feedbackmekanisme for indhold og erstatter det med et nyt feedbacksystem. Du kan få flere oplysninger under:Indsend og få vist feedback om