Solved

upload file with asp language

Posted on 1998-03-10
2
224 Views
Last Modified: 2013-12-25
how can i do to upload a file from a client using
asp language ?

0
Comment
Question by:ocorrea
2 Comments
 

Accepted Solution

by:
amit_gupta earned 100 total points
ID: 1832145
Hello,

1) ASP itself has got nothing (or very little) to do with uploading files from the client. It is just a server-side scripting technology (part of Microsoft's Active SERVER Platform).

2) How to upload files depends on which browsers you are catering to:

If you are using a Netscape or Microsoft-IE4 browser, you can use the FORM INPUT tag with TYPE=FILE. Doing this places an element on an HTML form letting the user supply a file as input. When the form is submitted, the content of the specified file is sent to the server along with the other form data. The ACTION tag of your form may point to an ASP file, which will read the uploaded file (request.form("myfile")) and write it to a file on the server (using the Microsoft FileSystem Object which comes with ASP).

For a demo visit www.geocities.com, click JOIN (top right icon) to become a member, click MEMBERS, click FILE MANAGER - login and then click "EZ Upload" to see how they upload files using the <INPUT TYPE="file" NAME="my....."> form element.

If you are using IE3.x, the only way is to use "Microsoft File Upload Control". This is part of Microsoft's Web Posting Acceptor, which can be downloaded at http://www.microsoft.com/windows/software/webpost/post_accept.htm

You will have to install the web-posting acceptor on your IIS... this will install files named UPLOADX.ASP in the SCRIPTS directory under INETPUB... this will demostrate how to upload files...

This activex control (and its corresponding server-side acceptor) has to be used for IE3 because it does not support the TYPE=FILE option for INPUT elements. Microsoft has posted an update for this at http://www.microsoft.com/ie/download/ie3add.htm, but i havent really tested it...

Happy uploading.

Amit Gupta

0
 

Author Comment

by:ocorrea
ID: 1832146
The tip was very interesting about type=file but the main problem is how can i put the file from the client to the server.

As a matter of fact when i'm triying to write a file with the filesystem object utility this only read and write at the server side but how should i do to read a client disk from the web whit ASP language .

i don't know if i'm being clear , but the main question is how can i read a lient disk ( file ) with asp and how can i write or send this file to the server .
Because i have a lot of experience with asp , im have worked with filesystem object for several times .
Can you explain me better of this topic ???

for example :
Set fs = CreateObject("Scripting.FileSystemObject")
Set a = fs.CreateTextFile("c:\testfile.txt", True)a.WriteLine("This is a test.")
a.Close

this is the way about fileystemobject so ????
what should i do ??

Thank for your comments .....
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

Suggested Solutions

It is becoming increasingly popular to have a front-page slider on a web site. Nearly every TV website,  magazine or online news has one on their site, and even some e-commerce sites have one. Today you can use sliders with Joomla, WordPress or …
Active Directory replication delay is the cause to many problems.  Here is a super easy script to force Active Directory replication to all sites with by using an elevated PowerShell command prompt, and a tool to verify your changes.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

772 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