Removes all the System.Web.Configuration.UrlMapping objects from the collection.
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:
If you pass System.Configuration.ConfigurationSaveMode.Full or System.Configuration.ConfigurationSaveMode.Modified as the parameter value, a clear element is inserted into the urlMappings section of the configuration file at the current hierarchy level.
If you pass System.Configuration.ConfigurationSaveMode.Minimal as the parameter value, a series of remove elements are added to the urlMappings of the configuration file at the current hierarchy level. These remove elements remove all references to the add elements defined in the parent configuration files at higher levels in the hierarchy. With the System.Configuration.ConfigurationSaveMode.Minimal enumeration value, there is one additional property on the collection that affects what gets serialized to the configuration file. The property is System.Configuration.ConfigurationElementCollection.EmitClear and is false by default. One of the following conditions applies:
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.