UrlMappingCollection.Remove 메서드

정의

컬렉션에서 UrlMapping 개체를 제거합니다.

오버로드

Remove(String)

컬렉션에서 지정된 이름의 UrlMapping 개체를 제거합니다.

Remove(UrlMapping)

컬렉션에서 지정된 UrlMapping 개체를 제거합니다.

Remove(String)

컬렉션에서 지정된 이름의 UrlMapping 개체를 제거합니다.

public:
 void Remove(System::String ^ name);
public void Remove (string name);
member this.Remove : string -> unit
Public Sub Remove (name As String)

매개 변수

name
String

컬렉션에서 제거할 UrlMapping 개체의 이름입니다.

예제

다음 코드 예제를 제거 합니다 UrlMapping 에서 개체를 UrlMappingCollection입니다.

코드 예제에서는 참조는 UrlMappingCollection 클래스 항목 컬렉션을 가져오는 방법을 알아봅니다.


// Remove the URL with the
// specified name from the collection
// (if exists).
urlMappings.Remove("~/default.aspx");

// Update the configuration file.
if (!urlMappingSection.IsReadOnly())
  configuration.Save();
' Remove the URL with the
' specified name from the collection
' (if exists).
urlMappings.Remove("~/home.aspx")

' Update the configuration file.
If Not urlMappingSection.IsReadOnly() Then
    configuration.Save()
End If

설명

Remove 메서드를 add 요소에는 urlMappings 삽입 고 현재 계층 구조 수준에 있는 섹션을 remove 요소입니다. Remove 요소에 대 한 참조를 효과적으로 제거 합니다 add 부모 구성에 정의 된 요소 파일 계층 구조에서 상위 수준에 있지만 삭제 하지 않습니다.

추가 정보

적용 대상

Remove(UrlMapping)

컬렉션에서 지정된 UrlMapping 개체를 제거합니다.

public:
 void Remove(System::Web::Configuration::UrlMapping ^ urlMapping);
public void Remove (System.Web.Configuration.UrlMapping urlMapping);
member this.Remove : System.Web.Configuration.UrlMapping -> unit
Public Sub Remove (urlMapping As UrlMapping)

매개 변수

urlMapping
UrlMapping

컬렉션에서 제거할 UrlMapping 개체입니다.

예제

다음 코드 예제를 제거 합니다 UrlMapping 에서 개체를 UrlMappingCollection입니다.

코드 예제에서는 참조는 UrlMappingCollection 클래스 항목 컬렉션을 가져오는 방법을 알아봅니다.


// Create a UrlMapping object.
urlMapping = new UrlMapping(
  "~/home.aspx", "~/default.aspx?parm1=1");

// Remove it from the collection
// (if exists).
urlMappings.Remove(urlMapping);

// Update the configuration file.
if (!urlMappingSection.IsReadOnly())
  configuration.Save();
' Create a UrlMapping object.
urlMapping = New UrlMapping( _
"~/home.aspx", "~/default.aspx?parm1=1")

' Remove it from the collection
' (if exists).
urlMappings.Remove(urlMapping)

' Update the configuration file.
If Not urlMappingSection.IsReadOnly() Then
    configuration.Save()
End If

설명

Remove 메서드를 add 요소에는 urlMappings 삽입 고 현재 계층 구조 수준에 있는 섹션을 remove 요소입니다. Remove 요소에 대 한 참조를 효과적으로 제거 합니다 add 부모 구성에 정의 된 요소 파일 계층 구조에서 상위 수준에 있지만 삭제 하지 않습니다.

추가 정보

적용 대상