Recently I encounter a situation where I have to open a browser window from desktop/ window application.
I tried a lot and found the solutions.
namespace I used for that
using System.Diagnostics;
I call following function to meet my requirment
public void OpenBrowser(string SiteUrl)
    {
        Process proc = new Process();
        proc.StartInfo.UseShellExecute = true;
        proc.StartInfo.FileName = SiteUrl;
        proc.Start();
    }
this function requests SiteUrl as input parameter where SiteUrl is the web address of the page I want to open in browser window.
Hope this code helps you in your coding
enjoy coding.......................
No comments:
Post a Comment