Jason Gagnon
Jason Gagnon

Reputation: 189

Open HTML file in C# application

I have added an HTML file to my solution in VS2010. How do you create a call to open the HTML file? For example when a user clicks a button it will locate the HTML file in my solution and open it in the web browser.

Upvotes: 2

Views: 24355

Answers (2)

M Shoeb
M Shoeb

Reputation: 61

System.Diagnostics.Process.Start(
  Server.MapPath("~/HtmlFileFolderNameInSolution/") + "HtmlFileName.htm"
);

This will open HTML file in new tab of same browser...

Upvotes: 0

KF2
KF2

Reputation: 10143

you can use web browser control

webbrowser.Navigate("File location.html")

for more information see here

Upvotes: 4

Related Questions