Solved

example to upload .pdf files in asp.net

Posted on 2014-02-12
2
554 Views
Last Modified: 2014-03-05
Hi all, i need a structure to upload .pdf files
and add a description and a viewer in order to download it, or add it a file
is any example can you provide me asp.net 2010

tsm
edo
0
Comment
Question by:edo60
2 Comments
 
LVL 33

Accepted Solution

by:
Big Monty earned 500 total points
ID: 39854391
here's a good tutorial for you to read on the basics of uploading files:

http://www.developer.com/net/asp/article.php/3097661/File-Uploading-Using-ASPNET.htm

to summarize, you create a form where the end user can select a file to upload. once they hit submit, you then save the file somewhere on your web server (maybe a folder called "/uploads/") and then save the path of the file to the database, which you can then retrieve later to display the info.

Read the tutorial, try out some code, then come back and asp specific questions on where you get stuck.
0
 

Author Comment

by:edo60
ID: 39857239
hi you expert
In the document you send me is not clear in where i need to put this code

Public Function FileFieldSelected(ByVal FileField As _
  System.Web.UI.HtmlControls.HtmlInputFile) As Boolean
    ' Returns a True if the passed
    ' FileField has had a user post a file
    If FileField.PostedFile Is Nothing Then Return False
    If FileField.PostedFile.ContentLength = 0 Then Return False
    Return True
End Function

and what code is in the upload file button?
tsm
0

Featured Post

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Display field if column exists 7 36
SP result not being displayed 5 44
.CSS HTML Help 3 30
ASP.NET Complete Life Cycle for all the controls 2 24
"In order to have an organized way for empathy mapping, we rely on a psychological model and trying to model it in a simple way, so we will split the board to three section for each persona and a scenario and try to see what those personas would Do,…
Get to know the ins and outs of building a web-based ERP system for your enterprise. Development timeline, technology, and costs outlined.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…

730 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