Solved

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

Posted on 2016-11-04
2
41 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 9

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

749 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