Monday, September 28, 2009

Open a URL in Internet Explorer using Process.Start

You can use System.Diagnostics.Process.Start to launch Internet Explorer and open a web page.

The below code will open the specified URL in the default browser window.

string strWebLink = "www.techieideas.blogspot.com";
Process.Start("iexplore.exe", strWebLink);

The below code will open the specified URL in a new browser window.

string strWebLink = "www.techieideas.blogspot.com";
Process.Start(@"C:\Program Files\Internet Explorer\iexplore.exe", "-new " + strWebLink);

0 Comments:

blogger templates | Make Money Online