UrlMappingCollection.Remove 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
UrlMapping 컬렉션에서 개체를 제거합니다.
오버로드
| Name | Description |
|---|---|
| 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 를 효과적으로 제거하지만 삭제하지는 않습니다.