Training
Module
Build your First HTML Webpage - Training
Illustrates basic programming techniques using Visual Studio Code to write HTML and CSS.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
You can use the WebBrowser control to display and print HTML documents without providing the full functionality of an Internet Web browser. This is useful when you want to take advantage of the formatting capabilities of HTML but do not want your users to load arbitrary Web pages that may contain untrusted Web controls or potentially malicious script code. You might want to restrict the capability of the WebBrowser control in this manner, for example, to use it as an HTML email viewer or to provide HTML-formatted help in your application.
Set the AllowWebBrowserDrop property to false
to prevent the WebBrowser control from opening files dropped onto it.
webBrowser1.AllowWebBrowserDrop = false;
webBrowser1.AllowWebBrowserDrop = False
Set the Url property to the location of the initial file to display.
webBrowser1.Url = new Uri("http://www.contoso.com/");
webBrowser1.Url = New Uri("http://www.contoso.com/")
This example requires:
A WebBrowser control named webBrowser1
.
References to the System
and System.Windows.Forms
assemblies.
.NET Desktop feedback feedback
.NET Desktop feedback is an open source project. Select a link to provide feedback:
Training
Module
Build your First HTML Webpage - Training
Illustrates basic programming techniques using Visual Studio Code to write HTML and CSS.