1
Answer

how to render html file in browser

anand m

anand m

1y
594
1

Hello All,

 

I have requirement to rendered .HTML file into the browser and .HTML file stored in physcial file.

Same code I need to rendered .HTML file into the brower using asp.net C# 20222 solution.

Below code we rendered using PDF file same like i need to rendered in HTML file in browser.

 WebClient User = new WebClient();
 Byte[] FileBuffer = User.DownloadData(FilePath);
 if (FileBuffer != null)
 {
     Response.ContentType = "application/pdf";
     Response.AddHeader("content-length", FileBuffer.Length.ToString());
     Response.BinaryWrite(FileBuffer);
 }

Answers (1)