ASP Component Building

by Bob Dombroski

Write an ASP Com component, what are you nuts? Write an ASP Com component, what are you nuts?

Why not? With Visual Basic its pretty easy to tie in the needed ASP object library and access everything you would normally access in your ASP pages. After that its just adding common programming logic to accomplish the task you set out to do. At first it may seem overwhelming, but after putting together a component you will be wanting to create components to do all your common tasks.

So lets come up with something good to write a component for, something we might actually use. How about file uploading thru html? Sounds pretty bland, so lets also set out to do some cool stuff, like allowing for directory changing, multiple files within one upload, returning a collection of files along with some information about the files, a collection of objects and their values from the posting page. Shucks maybe we want to be able to delete a file after we stored it or even move it.

Okay have I got your interest yet? If your saying that this is over your head, read on because you will be surpised how easy it can be.

First a little background on html file transfers. You can find all about the standards set for html by looking up RFC HTML in any search engine. Here is the site I use as a reference http://www.cis.ohio-state.edu/hypertext/information/rfc.html. From there you can read about all the agreed upon standards and the white papers on each RFC standard. It comes in handy when you are coding anything dealing with telnet, ftp, or html.

Unfortunately you can not access the file data with the standard asp request object. You have to get down to the binary information  to get to the data. After that its just parsing out the data from the stream and returning it in a usefull manner. Thats easy!

This article was originally published on Apr 21, 1999
Page 1 of 4

Thanks for your registration, follow us on our social networks to keep up-to-date