Solved

ASP Upload with VB dll's

Posted on 2001-08-21
4
407 Views
Last Modified: 2007-11-27
I am working with a 3 tier architucture for a websupport project. I use VB dll's which are installed in webserver but the original dll residing with the application server.

Now that i have to upload files onto the webserver in the similar manner above with a VB dll and some ASP pages that will call these dll's to upload the files onto the webserver.

Can anyone provide me with the code for both the ASPupload dll written in VB code as well as the ASP pages for the same....

S.Ramanujam.
0
Comment
Question by:ramanujamsampath
  • 2
4 Comments
 
LVL 20

Expert Comment

by:Silvers5
ID: 6409672
Uploading typically requires a component, either the posting acceptor from Microsoft, ASPUpload from http://www.aspupload.com/, SAFileUp from http://www.softartisans.com, ActiveFile from http://www.infomentum.com/activefile/, or ScriptUtilities from http://www.pstruh.cz/help/ScptUtl/library.htm (which also has "PureASP" -- a way to upload without a component).
 
0
 
LVL 33

Accepted Solution

by:
hongjun earned 75 total points
ID: 6412143
VB Example
==========
Project->References and make sure "AspUpload 2.1 Type Library" is selected.
Add the below code in form code window

Private Sub Form_Load()
     Dim objUpload As ASPUPLOADLib.UploadManager

     Set objUpload = New ASPUPLOADLib.UploadManager

     objUpload.CopyFile "C:\your_file.txt", "c:\upload\your_file.txt"

     Set objUpload = Nothing
End Sub




ASP Example
===========
first_page.asp
==============
<!-- Simple Upload Form -->

<HTML>
<BODY BGCOLOR="#FFFFFF">
<h2>Sample 1: Simple Uploading</h2>

     <FORM METHOD="POST" ENCTYPE="multipart/form-data" ACTION="second_page.asp">
          <INPUT TYPE=FILE SIZE=60 NAME="FILE1"><BR>
          <INPUT TYPE=FILE SIZE=60 NAME="FILE2"><BR>
          <INPUT TYPE=FILE SIZE=60 NAME="FILE3"><BR>
          <INPUT TYPE=SUBMIT VALUE="Upload!">
     </FORM>

</BODY>
</HTML>


second_page.asp
===============
<HTML>
<BODY BGCOLOR="#FFFFFF">

<%
     Set Upload = Server.CreateObject("Persits.Upload.1")
     Count = Upload.Save("c:\upload")
%>

<% = Count %> files uploaded.

<%
     If Upload.Expires <> CDate("9/9/9999") Then Response.Write "<HR>AspUpload expires on " & Upload.Expires
%>
</BODY>
</HTML>
<%
Set Upload = Nothing
%>


There's really no equivalent code between Asp and VB. For VB, you got to hardcode the file to be uploaded. But of course you can always substitute to source file and the destination using 2 textboxes for users to type. Then it becomes dynamic. You can also consider using Common Dialog box to get the source and destination file path.


hongjun
0
 
LVL 5

Expert Comment

by:Netminder
ID: 7135198
A request has been made (http://www.experts-exchange.com/cleanup/Q_20320181.html) that this question be closed with the following resolution: points to hongjun

EXPERTS: Please leave any comment regarding this request here; I will return in seven (7) days to close the question.

Netminder
CS Moderator
0
 
LVL 5

Expert Comment

by:Netminder
ID: 7158526
Per recommendation, force-accepted.

Netminder
CS Moderator
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Dynamic? Dropdown Box 29 70
An ASP query I cannot work out... 2 44
Live mode in DW, need to creae Session 4 56
Summernote required 3 57
I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

708 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now