Click here to Skip to main content
15,867,851 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Please Give the solution how to display the pdf file without using iframes in asp .net or give a solution for displaying with viewer .js in asp .net

Thank You .. . .
Posted
Comments
Sampath Lokuge 14-Apr-14 1:57am    
Your question is not clear ? Are you using any 3rd party pdf library or what ?
Praveenkumar l 14-Apr-14 3:03am    
no i have taken that as optional i ned to display the pdf .
actually i hav set of contents in treelistview that contents may be pdf or video when i click on content that corresponding content should open in next page their we ill have next previous buttons when user click on next button the corresponding content should open either video or pdf .

1 solution

You can use any one out of these 2 options:

1. Use <object> </object>TAG
2.
C#
Response.Clear();

string filePath = Your file path on the server 

Response.contentType = "application/pdf";

Response.WriteFile(filePath);
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900