post your comment   print   send to a friend
Rate: 100% | Views: 599
Question categories:  NT Plans

which asp upload component can i use with my windows-based hosting plan?

Answer by: Stuart Pierce, Aplus.Net Knowledge Base Support.

The Aplus.Net Windows-based hosting plans (Business Class Windows, Pro Windows and eCommerce Windows) support the Persits ASPUpload Component. This is one of the best and most popular ASP upload components. The Persits ASPUpload is a COM+ component which enables an ASP application to capture, save and process files uploaded to your web server with a browser. This KB article sets up a simple example of its use. Please consult the official webpage of this component at http://aspupload.com/index.html for more features. The User Manual is located at http://aspupload.com/manual.html.

The basic steps for uploading files using the ASPUpload Component with your Windows-based hosting plan are listed below:

  • creating an HTML form file (in our example: form.html)
  • creating an ASP script file (in our example: UploadScript.asp)
  • uploading these two files to your WWWROOT web directory (or any of its subdirectories). The example below assumes that both files reside in the same web directory.
  • setting writable permissions on the Destination Directory (the directory where files will be uploaded). The Destination Directory is specified in the UploadScript.asp file.

I. CREATING THE form.html FILE
Here is a complete working example of a form file allowing the upload of up to three files:

<HTML>
<BODY BGCOLOR="#FFFFFF">
<FORM METHOD="POST" ENCTYPE="multipart/form-data" ACTION="UploadScript.asp">
<INPUT TYPE="FILE" SIZE="40" NAME="FILE1"><BR>
<INPUT TYPE="FILE" SIZE="40" NAME="FILE2"><BR>
<INPUT TYPE="FILE" SIZE="40" NAME="FILE3"><BR>
<INPUT TYPE=SUBMIT VALUE="Upload">
</FORM>
</BODY>
</HTML>

At your form.html page, the form will look like this:



II. CREATING THE UploadScript.asp FILE
Here is a complete working example of a script file which will upload to a Destination Directory aspupload which is a subdirectory of the main WWWROOT:


<HTML>
<BODY>
<%
Set Upload = Server.CreateObject("Persits.Upload")
Count = Upload.Save("D:\inetpub\virtual\yourFTPusername\wwwroot\aspupload")

Response.Write Count & " file(s) uploaded to D:\inetpub\virtual\yourFTPusername\wwwroot\aspupload"
%>
</BODY>
</HTML>

In the example above you only have to replace yourFTPusername with your actual FTP username. Of course, you can also change the Destination Directory to any other already existing web directory.


III. UPLOADING form.html and UploadScript.asp TO YOUR FTP SPACE
You can use the File Manager tool for this matter:


IV. SETTING WRITABLE PERMISSIONS ON THE DESTINATION DIRECTORY
In our example, the Destination Directory is aspupload. Here is how you can set writable permissions using the File Manager tool available in the Control Panel:

Customer Feedback
Rate: 100% | Views: 599 | Please Rate:  
 
If you have other comments or ideas for future technical tips, please type them here:

Email: (optional)

Comments: (optional)

 Server Hosting | Business Web Hosting    Back to serch results
Browse the Base
Knowledge Base
Shared Hosting
  NT Plans
Messages
Private Area
 
Ask
in Private
   
Personal
Folder
 
Related Questions
 
1. How can I connect to a Microsoft Access database using ASP?
 
2. How do I access the SQL Server that comes with my Windows hosting plan?
 
3. Some of the asp pages in my site use ASPEmail or CDONTS mail components but they don't work.
 
4. How do I enable SQL on my Windows plan using Aplus.Net web Control Panel?
 
5. What do i need to do to get an ASP.NET project to work?
 
Home Browse Search Ask in Private Personal Folder   Help
powered by web hosting 
  Logged as: Guest