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
Solved

example to upload .pdf files in asp.net

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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

An enjoyable and seamless user experience can go a long way on an eCommerce site. While a cohesive layout and engaging copy play roles in creating a positive user experience, some sites neglect aspects that seem marginal but in actuality prove very …
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
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 get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.

839 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