Members

Technology Zones

IBM Learning Center

Articles

Hosted By

MaximumASP

Info

Rated
Read 128,853 times

Contents

Related Categories

Uploading Files with ASP - Compiling the component

Compiling the component

Phew... that was an awful lot of code to get through. Obviously, we haven't covered every line, but hopefully by now you should get the idea. The clsFormField object is basically used to store information about that field. A standard field will simply have it's name and value recorded. Meanwhile, a file also has a FileSize, ContentType and FileName property. Once parsed, our ASP script can then access all this information, and use the cFormField object's SaveFile method to save each file to the server's hard disk. This will be demonstrated on the next page.

First, however, we need to compile our component to a DLL file. To do this, go to File | Make ASPUploadComponent.dll . Before it can be used in your ASP script, however, IUSR_COMPUTERNAMEneeds to be given permission to access the file (and lock it!). To do this, display the file properties from explorer, and give IUSR_COMPUTERNAME read/execute permissions. Now, we are ready to create our other asp page.

James first started writing tutorials on Visual Basic in 1999 whilst starting this website (then known as VB Web). Since then, the site has grown rapidly, and James has written numerous tutorials, articles and reviews on VB, PHP, ASP and C#. In October 2003, James formed the company Developer Fusion Ltd, which owns this website, and also offers various development services. In his spare time, he's a 3rd year undergraduate studying Computer Science in the UK. He's also a Visual Basic MVP.

Comments

  • Invalid class string error

    Posted by selvass on 19 Apr 2005

    When i call to component in asp, when i run the uploaddemo.asp, i choose one file, once i press uploading
    showing at Invalid class string error. please help me this how to solve this.

  • A progress Bar for the Upload Component

    Posted by haguila on 12 Apr 2005

    Hi:
    The component is really good, the code works fine and it has not any problem when is impersonated via MTS.
    So, congratulations.
    From my ignorance the problem is the Event Blindness: I cannot mo...

  • Doubt

    Posted by livinvarghese on 03 Dec 2004


    Hello,

    how i can upload an Excel file which having the file Size 6MB by ASP.NET to the database.

  • ASP and VB DLL Debuggubg

    Posted by sunnysuku on 01 Apr 2004

    Please Help me !!
    How can I debug ASP pages and VB compenets . Ie I have ASP pages in Visual Interdev. These pages talking with few DLLS. I have the VB Source code for these dlls also. Please tell me...

  • what are the components of ASP?

    Posted by preetha on 01 Mar 2004

    What are the components of ASP and VB? Pls help me.