Can you use the input html tag?
<input type-="file" />
Main Topics
Browse All TopicsHello Experts,
I have a simple HTML form in Classic ASP. How can I code a Browse button to open the Windows (or Apple) Open Dialog and have the user select a file.
When clicking OK in the dialog, the file name is inserted into a text box.
When clicking Submit, the file is uploaded to a specific folder on the server.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
>>but how doi I receive / upload the selected file?
As you probably know, if you have a form with:
method="post", you would need Request.Form("fieldname")
and if you have method="get" (or pass data directly via querystring) you would Request.Querystring().
Well, whenever there is type="file" in the form, you MUST use method="post"
BUT you cannot simply do Request.Form("file"). There is not built-in mechanism in classic asp to retrieve the contents of the file. Instead you will need to rely on:
a. some other 3rd party installed component
OR
b. some script that parses the binary stream directly.
Here is an example of option b:
http://www.freeaspupload.n
Look at the Documentation link. The most important mentioned there are:
A) "...The most important things to remember about this form are its method and enctype. Method must be "POST" and enctype must be "multipart/form-data"...."
Which is basically saying, that your form would be similar to:
<form method="post" enctype="multipart/form-da
<input type="file" name="myUploadedFile" />
<input type="text" name="UserName" value=""/>
</form>
Where the information will be sent to mypage.asp
B) ..."When it comes to actually saving the uploaded files, it only takes two lines, one for the creation of the Free ASP Upload object and the other to extract the files from the POST request and save them to the server:
Set Upload = New FreeASPUpload
Upload.Save(upload directory path)
C) "To process other fields in the form, use the Form collection of the upload object the same way you would use the Form collection of the Request object. For example, if your form had a text element named UserName, your processing code would include:
strUserName = Upload.Form("UserName")
Enjoy
hielo,
I downloaded your recomended package, tried it as-is, it worked.
However, to implement it in my situation, I renamed "freeASPUpload" to "uploader.asp" and wrote the code below, as you suggested.
From support.asp, when I Submit, I just get the error message below (I have disabled friendly errors), but when I Refresh thank-you.asp, I get my "done." message (probobly because, my fileAttach contents gets dumped on refresh).
Any ideas?
Internet Explorer cannot display the webpage More information
This problem can be caused by a variety of issues, including: Internet connectivity has been lost.
The website is temporarily unavailable.
The Domain Name Server (DNS) is not reachable.
The Domain Name Server (DNS) does not have a listing for the website's domain.
There might be a typing error in the address.
If this is an HTTPS (secure) address, click Tools, click Internet Options, click Advanced, and check to be sure the SSL and TLS protocols are enabled under the security section.
For offline users
You can still view subscribed feeds and some recently viewed webpages.
To view subscribed feeds Click the Favorites Center button , click Feeds, and then click the feed you want to view.
To view recently visited webpages (might not work on all pages) Click Tools , and then click Work Offline.
Click the Favorites Center button , click History, and then click the page you want to view.
>>strFileName = Request.Form("fileAttach")
You are "violating" point "C" of my previous post. IF you dereference/access the data you sent to the server directly from the Request object [in this case you used Request.Form()] then the New FreeASPUpload script will NOT be able to read the Request Binary stream anymore to extract the file contents.
To clarify, if you are using that upload script you CANNOT use Request.Form("...") NOR can you use Request("..."). Instead you need to make a FreeASPUpload object and then retriever "OTHER" fields via that object intance. READ the documentation:
"You can check the length of keys to verify if the user actually uploaded any files; see example in the SaveFiles function of the uploadTester.asp code sample"
(http://www.freeaspupload.
Seriously, read it. Otherwise you will be back here every 5 minutes. If you downloaded the zip file, it should contain a file named uploadTest.asp. Look at the Save() function in that file so you understand how to test if the file was uploaded successfully.
Business Accounts
Answer for Membership
by: rpkharePosted on 2009-11-03 at 10:51:37ID: 25732129
Check this link: http://www.webdeveloper.co m/forum/sh owthread.p hp?t=13002 0