System.Web.Configuration.UrlMappingCollection.Clear Method

Removes all the System.Web.Configuration.UrlMapping objects from the collection.

Syntax

public void Clear ()

Remarks

If you save the configuration file after calling the UrlMappingCollection.Clear method, the result will be dependent upon the chosen System.Configuration.ConfigurationSaveMode.

The following list describes the conditions that apply if you use the System.Configuration.Configuration.Save(System.Configuration.ConfigurationSaveMode) method to save the file:

The UrlMappingCollection.Clear method actually deletes the add elements defined in the urlMappings section of the configuration file at the current hierarchy level. It also removes all references to the add elements defined in the parent configuration files at higher levels in the hierarchy but does not delete them.

Requirements

Namespace: System.Web.Configuration
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0