Upload - Use ASPForm object in VB6 class

Sample for ScriptUtils.ASPForm | Changes | Purchase | Download

Examples

Upload - Use ASPForm object in VB6 class 
Option Explicit
'Declare and create ASPForm object
Dim Form As New ASPHugeUpload.ASPForm
Dim Request As ASPTypeLibrary.Request
Dim Response As ASPTypeLibrary.Response

'OnStartPage
Public Sub OnStartPage(SC As ASPTypeLibrary.ScriptingContext)
  'Please add call of OnStartPage method of ASPForm
  'if you want to debug your VBA class
  Form.OnStartPage SC
  
  'Get request/response objects
  Set Request = SC.Request
  Set Response = SC.Response
  
  
  'some conditions
  If Request.ServerVariables("REQUEST_METHOD") = "POST" Then
    If Form.State = fscompleted Then
      'Store uploaded files
      Form.Files.Save "c:\upload"
    ElseIf Form.State >= fsError Then
      'handle form errors
      Select Case Form.State
        Case fsSizeLimit:
          Response.Redirect "http://....."
        Case fsTimeOut:
          Response.Write "......."
      End Select
    End If
  End If
End Sub

'Access ASPForm properties
Public Function FormState() As Long
  FormState = Form.State
End Function

Other links for the Upload - Use ASPForm object in VB6 class sample

ScriptUtils

Huge ASP upload is easy to use, hi-performance ASP file upload component with progress bar indicator. This component lets you upload multiple files with size up to 4GB to a disk or a database along with another form fields. Huge ASP file upload is a most featured upload component on a market with competitive price and a great performance . The software has also a free version of asp upload with progress, called Pure asp upload , written in plain VBS, without components (so you do not need to install anything on server). This installation package contains also ScriptUtilities library. Script Utilities lets you create hi-performance log files , works with binary data , you can download multiple files with zip/arj compression, work with INI files and much more with the ASP utility.

© 1996 - 2011 Antonin Foller, Motobit Software | About, Contacts | e-mail: info@pstruh.cz


Other Motobit links:   IISTracer, real-time IIS monitor   ASP file upload - upload files to ASP. 
ActiveX/VBSScript registry editor  ActiveX NT User account manager  Export MDB/DBF from ASP Active LogFile  Email export  ActiveX/ASP Scripting Dictionary object