How to open a webpage when we click a button?

To open a webpage in your system’s default web browser, when you click a button in your form, write the following code in your button click event:

Dim sURL as String = "http://www.dotnetblogger.info"
Process.Start(sURL)

The above piece of code will lauch the web page as specified with the default browser.

Tested with VS 2008

If you found any issues with the code posted above, please leave a comment. We will fix the code as soon as possible.

Incoming search terms:

This entry was posted in VB.Net and tagged button click, How to, open html page from .net, open webpage, open website, VB.Net, vs 2008 code, web page. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>