Solved

example to upload .pdf files in asp.net

Posted on 2014-02-12
2
536 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 32

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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

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 …
Any business that wants to seriously grow needs to keep the needs and desires of an international audience of their websites in mind. Making a website friendly to international users isn’t prohibitively expensive and can provide an incredible return…
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…
The viewer will learn how to count occurrences of each item in an array.

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

20 Experts available now in Live!

Get 1:1 Help Now