HttpModuleActionCollection.Add(HttpModuleAction) Method
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.
Adds an HttpModuleAction object to the collection.
public:
void Add(System::Web::Configuration::HttpModuleAction ^ httpModule);
public void Add (System.Web.Configuration.HttpModuleAction httpModule);
member this.Add : System.Web.Configuration.HttpModuleAction -> unit
Public Sub Add (httpModule As HttpModuleAction)
Parameters
- httpModule
- HttpModuleAction
The HttpModuleAction module to add to the collection.
Exceptions
An attempt was made to add an HttpModuleAction object that already exists in the collection.
Examples
The following example shows how to create an HttpModuleAction object and add it to the collection.
// Create a new module object.
HttpModuleAction ModuleAction =
new HttpModuleAction("MyModuleName",
"MyModuleType");
// Add the module to the collection.
if (!httpModulesSection.SectionInformation.IsLocked)
{
modulesCollection.Add(ModuleAction);
configuration.Save();
}
' Create a new module object.
Dim ModuleAction As New HttpModuleAction( _
"MyModuleName", "MyModuleType")
' Add the module to the collection.
If Not httpModulesSection.SectionInformation.IsLocked Then
modulesCollection.Add(ModuleAction)
configuration.Save()
End If
Remarks
Adds an HttpModuleAction object to the collection.
Applies to
Povratne informacije
https://aka.ms/ContentUserFeedback.
Kmalu na voljo: V letu 2024 bomo ukinili storitev Težave v storitvi GitHub kot mehanizem za povratne informacije za vsebino in jo zamenjali z novim sistemom za povratne informacije. Za več informacij si oglejte:Pošlji in prikaži povratne informacije za