Share via


WebBrowser.GoBack 메서드

정의

이전 문서(있는 경우)를 다시 탐색합니다.

public:
 void GoBack();
[System.Security.SecurityCritical]
public void GoBack ();
public void GoBack ();
[<System.Security.SecurityCritical>]
member this.GoBack : unit -> unit
member this.GoBack : unit -> unit
Public Sub GoBack ()
특성

예외

WebBrowser 인스턴스가 더 이상 유효하지 않습니다.

기본 네이티브 WebBrowser에 대한 참조를 검색할 수 없습니다.

다시 탐색할 문서가 없는 경우

예제

다음 예제에서는 호출 GoBack하여 이전 HTML 문서로 다시 이동하는 방법을 보여줍니다. 이 예제에서는 먼저 확인하여 다시 탐색할 HTML 문서가 있는지 확인합니다 CanGoBack.

private void backButton_Click(object sender, RoutedEventArgs e)  
{  
  // Navigate to the previous HTML document, if there is one  
  if (this.webBrowser.CanGoBack)  
  {  
    this.webBrowser.GoBack();  
  }  
}  

설명

호출 GoBack 하고 다시 WebBrowser 탐색할 문서가 없는 경우 탐색을 수행하지 않고 예외가 throw됩니다. 필요한 경우 속성 값을 CanGoBack 검사하여 다시 탐색할 문서가 있는지 여부를 확인할 수 있습니다.

적용 대상

추가 정보