Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Open PDF in web page of ASP.NET

Tags:

c#

asp.net

pdf

I want to open PDF in ASP.NET aspx page. I dont want to export a pdf file.

Need just write pdf file in ASPX page same as we are writing bytes into Image control.

like image 863
Lajja Thaker Avatar asked Feb 20 '23 18:02

Lajja Thaker


1 Answers

I got the answer , it is too simple.

I have answered here.

Response.Clear();
string filePath = "myfile.pdf";
Response.contentType = "application/pdf";
Response.WriteFile(filePath);
Response.End();
like image 158
Lajja Thaker Avatar answered Feb 22 '23 08:02

Lajja Thaker