Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
495 lines (448 sloc) 30.2 KB
<Type Name="UrlMappingCollection" FullName="System.Web.Configuration.UrlMappingCollection">
<TypeSignature Language="C#" Value="public sealed class UrlMappingCollection : System.Configuration.ConfigurationElementCollection" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi sealed UrlMappingCollection extends System.Configuration.ConfigurationElementCollection" />
<TypeSignature Language="DocId" Value="T:System.Web.Configuration.UrlMappingCollection" />
<TypeSignature Language="VB.NET" Value="Public NotInheritable Class UrlMappingCollection&#xA;Inherits ConfigurationElementCollection" />
<TypeSignature Language="C++ CLI" Value="public ref class UrlMappingCollection sealed : System::Configuration::ConfigurationElementCollection" />
<TypeSignature Language="F#" Value="type UrlMappingCollection = class&#xA; inherit ConfigurationElementCollection" />
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Configuration.ConfigurationElementCollection</BaseTypeName>
</Base>
<Interfaces />
<Attributes>
<Attribute>
<AttributeName>System.Configuration.ConfigurationCollection(typeof(System.Web.Configuration.UrlMapping))</AttributeName>
</Attribute>
</Attributes>
<Docs>
<summary>Represents a collection of <see cref="T:System.Web.Configuration.UrlMapping" /> objects. This class cannot be inherited.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.Configuration.UrlMappingCollection> type allows access to the <xref:System.Web.Configuration.UrlMappingsSection.UrlMappings%2A> elements of the <xref:System.Web.Configuration.UrlMappingsSection> section element collection.
## Examples
The following code example shows how to obtain the <xref:System.Web.Configuration.UrlMappingCollection> object from the configuration file of an existing Web application. Also shown is an excerpt of the configuration file.
```
<urlMappings enabled="true">
<add url= "~/home.aspx"
mappedUrl="~/default.aspx?parm1=1"/>
<add url= "~/products.aspx"
mappedUrl="~/default.aspx?parm1=2"/>
</urlMappings>
```
[!code-csharp[System.Web.Configuration.UrlMapping#1](~/samples/snippets/csharp/VS_Snippets_WebNet/System.Web.Configuration.UrlMapping/CS/urlmapping.cs#1)]
[!code-vb[System.Web.Configuration.UrlMapping#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.UrlMapping/VB/urlmapping.vb#1)]
]]></format>
</remarks>
<altmember cref="T:System.Web.Configuration.UrlMapping" />
<altmember cref="T:System.Web.Configuration.UrlMappingsSection" />
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public UrlMappingCollection ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.Configuration.UrlMappingCollection.#ctor" />
<MemberSignature Language="VB.NET" Value="Public Sub New ()" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; UrlMappingCollection();" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters />
<Docs>
<summary>Initializes a new instance of the <see cref="T:System.Web.Configuration.UrlMappingCollection" /> class.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.Configuration.UrlMappingCollection.%23ctor%2A> constructor is not intended to be used directly from your code. It is called by the ASP.NET configuration system. You obtain an instance of the <xref:System.Web.Configuration.UrlMappingCollection> class by using <xref:System.Web.Configuration.UrlMappingsSection.UrlMappings%2A> property.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="Add">
<MemberSignature Language="C#" Value="public void Add (System.Web.Configuration.UrlMapping urlMapping);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void Add(class System.Web.Configuration.UrlMapping urlMapping) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.Configuration.UrlMappingCollection.Add(System.Web.Configuration.UrlMapping)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; void Add(System::Web::Configuration::UrlMapping ^ urlMapping);" />
<MemberSignature Language="F#" Value="member this.Add : System.Web.Configuration.UrlMapping -&gt; unit" Usage="urlMappingCollection.Add urlMapping" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="urlMapping" Type="System.Web.Configuration.UrlMapping" />
</Parameters>
<Docs>
<param name="urlMapping">The <see cref="T:System.Web.Configuration.UrlMapping" /> object to add to the collection.</param>
<summary>Adds the specified <see cref="T:System.Web.Configuration.UrlMapping" /> to the collection.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following code example adds a <xref:System.Web.Configuration.UrlMapping> object to the <xref:System.Web.Configuration.UrlMappingCollection>.
Refer to the code example in the <xref:System.Web.Configuration.UrlMappingCollection> class topic to learn how to get the collection.
[!code-csharp[System.Web.Configuration.UrlMapping#3](~/samples/snippets/csharp/VS_Snippets_WebNet/System.Web.Configuration.UrlMapping/CS/urlmapping.cs#3)]
[!code-vb[System.Web.Configuration.UrlMapping#3](~/samples/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.UrlMapping/VB/urlmapping.vb#3)]
]]></format>
</remarks>
<altmember cref="T:System.Web.Configuration.UrlMapping" />
<altmember cref="T:System.Web.Configuration.UrlMappingsSection" />
</Docs>
</Member>
<Member MemberName="AllKeys">
<MemberSignature Language="C#" Value="public string[] AllKeys { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance string[] AllKeys" />
<MemberSignature Language="DocId" Value="P:System.Web.Configuration.UrlMappingCollection.AllKeys" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property AllKeys As String()" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property cli::array &lt;System::String ^&gt; ^ AllKeys { cli::array &lt;System::String ^&gt; ^ get(); };" />
<MemberSignature Language="F#" Value="member this.AllKeys : string[]" Usage="System.Web.Configuration.UrlMappingCollection.AllKeys" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String[]</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets an array of the keys for all of the configuration elements contained in the <see cref="T:System.Web.Configuration.UrlMappingCollection" />.</summary>
<value>An array of the keys for all of the <see cref="T:System.Web.Configuration.UrlMapping" /> objects contained in the <see cref="T:System.Web.Configuration.UrlMappingCollection" />.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Clear">
<MemberSignature Language="C#" Value="public void Clear ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void Clear() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.Configuration.UrlMappingCollection.Clear" />
<MemberSignature Language="VB.NET" Value="Public Sub Clear ()" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; void Clear();" />
<MemberSignature Language="F#" Value="member this.Clear : unit -&gt; unit" Usage="urlMappingCollection.Clear " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Removes all the <see cref="T:System.Web.Configuration.UrlMapping" /> objects from the collection.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
If you save the configuration file after calling the <xref:System.Web.Configuration.UrlMappingCollection.Clear%2A> method, the result will be dependent upon the chosen <xref:System.Configuration.ConfigurationSaveMode>.
The following list describes the conditions that apply if you use the <xref:System.Configuration.Configuration.Save%2A> method to save the file:
- If you pass <xref:System.Configuration.ConfigurationSaveMode.Full> or <xref:System.Configuration.ConfigurationSaveMode.Modified?displayProperty=nameWithType> 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 <xref: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 <xref: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 <xref:System.Configuration.ConfigurationElementCollection.EmitClear%2A> and is `false` by default. One of the following conditions applies:
- <xref:System.Configuration.ConfigurationElementCollection.EmitClear%2A> set to `true`. A `clear` element is inserted into the `urlMappings` section of the configuration file at the current hierarchy level. This removes all references to the `add` elements defined in the parent configuration files at higher levels in the hierarchy.
- <xref:System.Configuration.ConfigurationElementCollection.EmitClear%2A> flag is set to `false`. This has the effect of removing the `clear` element from the `urlMappings` section of the configuration file at the current hierarchy level, if it exists.
The <xref:System.Web.Configuration.UrlMappingCollection.Clear%2A> 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.
## Examples
The following code example removes all <xref:System.Web.Configuration.UrlMapping> objects from the <xref:System.Web.Configuration.UrlMappingCollection>.
Refer to the code example in the <xref:System.Web.Configuration.UrlMappingCollection> class topic to learn how to get the collection.
[!code-csharp[System.Web.Configuration.UrlMapping#4](~/samples/snippets/csharp/VS_Snippets_WebNet/System.Web.Configuration.UrlMapping/CS/urlmapping.cs#4)]
[!code-vb[System.Web.Configuration.UrlMapping#4](~/samples/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.UrlMapping/VB/urlmapping.vb#4)]
]]></format>
</remarks>
<altmember cref="T:System.Web.Configuration.UrlMapping" />
<altmember cref="T:System.Web.Configuration.UrlMappingsSection" />
</Docs>
</Member>
<Member MemberName="CreateNewElement">
<MemberSignature Language="C#" Value="protected override System.Configuration.ConfigurationElement CreateNewElement ();" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig virtual instance class System.Configuration.ConfigurationElement CreateNewElement() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.Configuration.UrlMappingCollection.CreateNewElement" />
<MemberSignature Language="VB.NET" Value="Protected Overrides Function CreateNewElement () As ConfigurationElement" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; override System::Configuration::ConfigurationElement ^ CreateNewElement();" />
<MemberSignature Language="F#" Value="override this.CreateNewElement : unit -&gt; System.Configuration.ConfigurationElement" Usage="urlMappingCollection.CreateNewElement " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Configuration.ConfigurationElement</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="GetElementKey">
<MemberSignature Language="C#" Value="protected override object GetElementKey (System.Configuration.ConfigurationElement element);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig virtual instance object GetElementKey(class System.Configuration.ConfigurationElement element) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.Configuration.UrlMappingCollection.GetElementKey(System.Configuration.ConfigurationElement)" />
<MemberSignature Language="VB.NET" Value="Protected Overrides Function GetElementKey (element As ConfigurationElement) As Object" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; override System::Object ^ GetElementKey(System::Configuration::ConfigurationElement ^ element);" />
<MemberSignature Language="F#" Value="override this.GetElementKey : System.Configuration.ConfigurationElement -&gt; obj" Usage="urlMappingCollection.GetElementKey element" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Object</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="element" Type="System.Configuration.ConfigurationElement" />
</Parameters>
<Docs>
<param name="element">To be added.</param>
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="GetKey">
<MemberSignature Language="C#" Value="public string GetKey (int index);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance string GetKey(int32 index) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.Configuration.UrlMappingCollection.GetKey(System.Int32)" />
<MemberSignature Language="VB.NET" Value="Public Function GetKey (index As Integer) As String" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; System::String ^ GetKey(int index);" />
<MemberSignature Language="F#" Value="member this.GetKey : int -&gt; string" Usage="urlMappingCollection.GetKey index" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="index" Type="System.Int32" />
</Parameters>
<Docs>
<param name="index">The collection index of the element to get.</param>
<summary>Gets the collection key of the specified element.</summary>
<returns>A string representing the value of the key.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<MemberGroup MemberName="Item">
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Gets or sets a <see cref="T:System.Web.Configuration.UrlMapping" /> in the collection.</summary>
</Docs>
</MemberGroup>
<Member MemberName="Item">
<MemberSignature Language="C#" Value="public System.Web.Configuration.UrlMapping this[int index] { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Web.Configuration.UrlMapping Item(int32)" />
<MemberSignature Language="DocId" Value="P:System.Web.Configuration.UrlMappingCollection.Item(System.Int32)" />
<MemberSignature Language="VB.NET" Value="Default Public Property Item(index As Integer) As UrlMapping" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Web::Configuration::UrlMapping ^ default[int] { System::Web::Configuration::UrlMapping ^ get(int index); void set(int index, System::Web::Configuration::UrlMapping ^ value); };" />
<MemberSignature Language="F#" Value="member this.Item(int) : System.Web.Configuration.UrlMapping with get, set" Usage="System.Web.Configuration.UrlMappingCollection.Item" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Web.Configuration.UrlMapping</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="index" Type="System.Int32" />
</Parameters>
<Docs>
<param name="index">The index of the object to get.</param>
<summary>Gets or sets the <see cref="T:System.Web.Configuration.UrlMapping" /> object at the specified index.</summary>
<value>The object at the specified index.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Item">
<MemberSignature Language="C#" Value="public System.Web.Configuration.UrlMapping this[string name] { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Web.Configuration.UrlMapping Item(string)" />
<MemberSignature Language="DocId" Value="P:System.Web.Configuration.UrlMappingCollection.Item(System.String)" />
<MemberSignature Language="VB.NET" Value="Default Public ReadOnly Property Item(name As String) As UrlMapping" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Web::Configuration::UrlMapping ^ default[System::String ^] { System::Web::Configuration::UrlMapping ^ get(System::String ^ name); };" />
<MemberSignature Language="F#" Value="member this.Item(string) : System.Web.Configuration.UrlMapping" Usage="System.Web.Configuration.UrlMappingCollection.Item" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Web.Configuration.UrlMapping</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="name" Type="System.String" />
</Parameters>
<Docs>
<param name="name">The name of the collection object.</param>
<summary>Gets the <see cref="T:System.Web.Configuration.UrlMapping" /> object with the specified name.</summary>
<value>The collection object that has the specified name.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Properties">
<MemberSignature Language="C#" Value="protected override System.Configuration.ConfigurationPropertyCollection Properties { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Configuration.ConfigurationPropertyCollection Properties" />
<MemberSignature Language="DocId" Value="P:System.Web.Configuration.UrlMappingCollection.Properties" />
<MemberSignature Language="VB.NET" Value="Protected Overrides ReadOnly Property Properties As ConfigurationPropertyCollection" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; virtual property System::Configuration::ConfigurationPropertyCollection ^ Properties { System::Configuration::ConfigurationPropertyCollection ^ get(); };" />
<MemberSignature Language="F#" Value="member this.Properties : System.Configuration.ConfigurationPropertyCollection" Usage="System.Web.Configuration.UrlMappingCollection.Properties" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Configuration.ConfigurationPropertyCollection</ReturnType>
</ReturnValue>
<Docs>
<summary>To be added.</summary>
<value>To be added.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<MemberGroup MemberName="Remove">
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Removes a <see cref="T:System.Web.Configuration.UrlMapping" /> object from the collection.</summary>
</Docs>
</MemberGroup>
<Member MemberName="Remove">
<MemberSignature Language="C#" Value="public void Remove (string name);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void Remove(string name) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.Configuration.UrlMappingCollection.Remove(System.String)" />
<MemberSignature Language="VB.NET" Value="Public Sub Remove (name As String)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; void Remove(System::String ^ name);" />
<MemberSignature Language="F#" Value="member this.Remove : string -&gt; unit" Usage="urlMappingCollection.Remove name" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="name" Type="System.String" />
</Parameters>
<Docs>
<param name="name">The name of the <see cref="T:System.Web.Configuration.UrlMapping" /> object to remove from the collection.</param>
<summary>Removes the <see cref="T:System.Web.Configuration.UrlMapping" /> object with the specified name from the collection.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.Configuration.UrlMappingCollection.Remove%2A> method deletes the `add` element in the `urlMappings` section at the current hierarchy level and inserts a `remove` element. The remove element effectively removes the reference to the `add` element defined in the parent configuration files at higher levels in the hierarchy but does not delete it.
## Examples
The following code example removes the <xref:System.Web.Configuration.UrlMapping> object from the <xref:System.Web.Configuration.UrlMappingCollection>.
Refer to the code example in the <xref:System.Web.Configuration.UrlMappingCollection> class topic to learn how to get the collection.
[!code-csharp[System.Web.Configuration.UrlMapping#6](~/samples/snippets/csharp/VS_Snippets_WebNet/System.Web.Configuration.UrlMapping/CS/urlmapping.cs#6)]
[!code-vb[System.Web.Configuration.UrlMapping#6](~/samples/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.UrlMapping/VB/urlmapping.vb#6)]
]]></format>
</remarks>
<altmember cref="T:System.Web.Configuration.UrlMapping" />
<altmember cref="T:System.Web.Configuration.UrlMappingsSection" />
</Docs>
</Member>
<Member MemberName="Remove">
<MemberSignature Language="C#" Value="public void Remove (System.Web.Configuration.UrlMapping urlMapping);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void Remove(class System.Web.Configuration.UrlMapping urlMapping) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.Configuration.UrlMappingCollection.Remove(System.Web.Configuration.UrlMapping)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; void Remove(System::Web::Configuration::UrlMapping ^ urlMapping);" />
<MemberSignature Language="F#" Value="member this.Remove : System.Web.Configuration.UrlMapping -&gt; unit" Usage="urlMappingCollection.Remove urlMapping" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="urlMapping" Type="System.Web.Configuration.UrlMapping" />
</Parameters>
<Docs>
<param name="urlMapping">The <see cref="T:System.Web.Configuration.UrlMapping" /> object to remove from the collection.</param>
<summary>Removes the specified <see cref="T:System.Web.Configuration.UrlMapping" /> object from the collection.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.Configuration.UrlMappingCollection.Remove%2A> method deletes the `add` element in the `urlMappings` section at the current hierarchy level and inserts a `remove` element. The remove element effectively removes the reference to the `add` element defined in the parent configuration files at higher levels in the hierarchy but does not delete it.
## Examples
The following code example removes the <xref:System.Web.Configuration.UrlMapping> object from the <xref:System.Web.Configuration.UrlMappingCollection>.
Refer to the code example in the <xref:System.Web.Configuration.UrlMappingCollection> class topic to learn how to get the collection.
[!code-csharp[System.Web.Configuration.UrlMapping#5](~/samples/snippets/csharp/VS_Snippets_WebNet/System.Web.Configuration.UrlMapping/CS/urlmapping.cs#5)]
[!code-vb[System.Web.Configuration.UrlMapping#5](~/samples/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.UrlMapping/VB/urlmapping.vb#5)]
]]></format>
</remarks>
<altmember cref="T:System.Web.Configuration.UrlMapping" />
<altmember cref="T:System.Web.Configuration.UrlMappingsSection" />
</Docs>
</Member>
<Member MemberName="RemoveAt">
<MemberSignature Language="C#" Value="public void RemoveAt (int index);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void RemoveAt(int32 index) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.Configuration.UrlMappingCollection.RemoveAt(System.Int32)" />
<MemberSignature Language="VB.NET" Value="Public Sub RemoveAt (index As Integer)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; void RemoveAt(int index);" />
<MemberSignature Language="F#" Value="member this.RemoveAt : int -&gt; unit" Usage="urlMappingCollection.RemoveAt index" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="index" Type="System.Int32" />
</Parameters>
<Docs>
<param name="index">The collection index of the <see cref="T:System.Web.Configuration.UrlMapping" /> object to remove.</param>
<summary>Removes the <see cref="T:System.Web.Configuration.UrlMapping" /> object with the specified index from the collection.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.Configuration.UrlMappingCollection.RemoveAt%2A> method deletes the `add` element in the `urlMappings` section at the current hierarchy level and inserts a `remove` element. The remove element effectively removes the reference to the `add` element defined in the parent configuration files at higher levels in the hierarchy but does not delete it.
## Examples
The following code example removes the <xref:System.Web.Configuration.UrlMapping> object from the <xref:System.Web.Configuration.UrlMappingCollection>.
Refer to the code example in the <xref:System.Web.Configuration.UrlMappingCollection> class topic to learn how to get the collection.
[!code-csharp[System.Web.Configuration.UrlMapping#7](~/samples/snippets/csharp/VS_Snippets_WebNet/System.Web.Configuration.UrlMapping/CS/urlmapping.cs#7)]
[!code-vb[System.Web.Configuration.UrlMapping#7](~/samples/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.UrlMapping/VB/urlmapping.vb#7)]
]]></format>
</remarks>
<altmember cref="T:System.Web.Configuration.UrlMapping" />
<altmember cref="T:System.Web.Configuration.UrlMappingsSection" />
</Docs>
</Member>
</Members>
</Type>
You can’t perform that action at this time.