Refer:
- Read HTML file and display it on ASP.Net Web Page
For selecting the files from the folder you need to make use of FileUpload control.
Please refer this code
HTML
<form id="form1" runat="server">
<div>
<asp:FileUpload ID="fuFileUpload" runat="server" />
<asp:Button Text="Upload and Display html File" OnClick="UploadDisplay" runat="server" />
<br />
<div id="dvHtml" runat="server">
</div>
</div>
</form>
Namespace
using System.IO;
C#
protected void UploadDisplay(object sender, EventArgs e)
{
if (this.fuFileUpload.HasFile)
{
this.fuFileUpload.PostedFile.SaveAs(Server.MapPath("~/HTMLFiles/" + Path.GetFileName(this.fuFileUpload.FileName)));
}
string body = string.Empty;
using (System.IO.StreamReader reader = new System.IO.StreamReader(Server.MapPath("~/HTMLFiles/" + Path.GetFileName(this.fuFileUpload.FileName))))
{
dvHtml.InnerHtml = reader.ReadToEnd();
}
}