Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I upload a file from my hard drive? 1

Status
Not open for further replies.

csiwa28

Programmer
Apr 12, 2001
177
I have an asp page that allows a user to write to a database the name of a product and the name of the image of that product. The asp page has two fields...one for the product and the other for the image. My question is, next to the text field for image i want a button that says "browse". The user will click it and a box will pop up and the user can search for the name of the image file in their hard drive instead of trying to remember the name and the name selected will appear in the text field for the image (Similar to when you go File->Open and that box pops up). What is this called and what's the easiest way to do it?
 
<form name=&quot;formname&quot; action=&quot;scriptname.asp&quot; method=&quot;post&quot; enctype=&quot;multipart/form-data&quot;>
<input type=&quot;file&quot; maxLength=&quot;100&quot; name=&quot;uploadfile&quot; size=&quot;30&quot;>
<input type=&quot;submit&quot; name=&quot;submit&quot; value=&quot;submit&quot;>
</form>

the input type=&quot;file&quot; gives you your 'browse' box.... and you need enctype=&quot;multipart/form-data&quot; in the form tag.
then just add any other form fields/headings, whatever.

and a component to upload the file, such as ASPUpload, SAFileUp, or others. there are other threads in this forum that give ideas on those.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top