WebBrowser.Source Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets the Uri of the current document hosted in the WebBrowser.
public:
property Uri ^ Source { Uri ^ get(); void set(Uri ^ value); };
public Uri Source { [System.Security.SecurityCritical] get; set; }
public Uri Source { get; set; }
[<get: System.Security.SecurityCritical>]
member this.Source : Uri with get, set
member this.Source : Uri with get, set
Public Property Source As Uri
Property Value
The Uri for the current HTML document.
- Attributes
Exceptions
The WebBrowser instance is no longer valid.
A reference to the underlying native WebBrowser
could not be retrieved.
Navigation from an application that is running in partial trust to a Uri that is not located at the site of origin.
Examples
The following example shows how to configure WebBrowser to navigate to an HTML document by using markup only.
<!-- Web Browser Control that hosts a web page. -->
<WebBrowser x:Name="webBrowser" Source="http://msdn.com"
Width="600" Height="600" />
Remarks
Setting the source property causes WebBrowser to navigate to the document specified by the Uri. If the Uri is null
, a blank document is displayed ("about:blank").
Applies to
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기