anand m

anand m

  • 1.4k
  • 339
  • 34.7k

how to render html file in browser

Oct 3 2023 3:59 PM

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)