Solved

ASP Upload with VB dll's

Posted on 2001-08-21
4
412 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 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

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…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

726 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