?
Solved

ASP Upload with VB dll's

Posted on 2001-08-21
4
Medium Priority
?
414 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 300 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

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
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…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

764 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