Solved

ASP.net See list of pdf documents in folder and read

Posted on 2016-11-04
2
22 Views
Last Modified: 2016-11-07
Hi

I have an ASP.net website on Azure. I want a user to be able to store pdf documents online and other people to  be able to see a list of these documents and read them.

What VB.net code would I use to see a list of the files in one of the folders? Then if they click on that how would they view the pdf?

Thanks
0
Comment
Question by:murbro
2 Comments
 
LVL 8

Accepted Solution

by:
Paweł earned 500 total points
ID: 41873775
you'd use the standard input[type=file] just specify the extension you want to filter

http://www.w3schools.com/tags/att_input_accept.asp

<input type="file" accept=".pdf" />

Open in new window


is that what you're thinking? or do you mean browsing on your azure website for the files?

because in that case you'd have to load the contents of a directory into memory and then display it to the user via some sort of UI. the following is a pretty good tutorial

http://www.aspsnippets.com/Articles/Display-list-of-files-from-Server-folder-in-ASPNet-GridView.aspx

just check out for the Directory.getFiles(string path, string pattern) function

https://msdn.microsoft.com/en-us/library/wz42302f(v=vs.110).aspx

for the pattern you can submit "*.pdf" to restrict it to pdf files.
0
 

Author Closing Comment

by:murbro
ID: 41878119
Thanks very much
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now