HttpModuleActionCollection.Add(HttpModuleAction) Methode

Definitie

Hiermee voegt u een HttpModuleAction object toe aan de verzameling.

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

De HttpModuleAction module die moet worden toegevoegd aan de verzameling.

Uitzonderingen

Er is een poging gedaan om een HttpModuleAction object toe te voegen dat al bestaat in de verzameling.

Voorbeelden

In het volgende voorbeeld ziet u hoe u een HttpModuleAction object maakt en toevoegt aan de verzameling.

// 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

Opmerkingen

Hiermee voegt u een HttpModuleAction object toe aan de verzameling.

Van toepassing op