Click here to Skip to main content
15,908,931 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
i have a project that contains one folder with pdf files,word files.my requirement is that i need to display that files in webpage.
for that i am using this code
HTML
<a href="~/foldername/filename"></a>

but in this case it is not taken the url.
and if i take
HTML
<a href="filename.docx">

it downloads the files but it's not displaying in the same web page.
Posted
Updated 21-Aug-13 1:11am
v3
Comments
Jameel VM 21-Aug-13 7:08am    
where is the code?
ridoy 21-Aug-13 7:09am    
i think you forgot to include code here..

Please go through How To Write Binary Files to the Browser Using ASP.NET and Visual C# .NET[^].

It supports PDF, Word, Excel and a variety of image file formats.
 
Share this answer
 
You need to use some activex programming to display the pdf file on your webpage.
Some browsers like Google chrome has inbuilt document viewer... Maybe, that's what you meant...
 
Share this answer
 

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