Creating your own class definition with the traditional ASP
Posted by Daniel - 284 Views
To follow the steps on this article you need at least Microsoft Windows 9x and IIS installed. This time we will learn and take a closer look at one of the traditional ASP?s feature, it is the ability to accept coder?s class definition. Long before the release of the .NET framework, this feature remains hidden for most of the coders, including myself. If you already familiar with Visual basic, you won?t find any difficulties implementing this feature into your web application since the structure needed to assemble an ASP class is quite similar to the class structure within the Visual Basic.
OK, lets get into it. Below is a simple class definition example created with traditional ASP, named MotorBike.
Private x_MBikeMake
Public Property Get Make()
Make = x_MBikeMake
End Property
Public Property Let Make(z_Make)
x_MBikeMake = z_Make
End Property
Private x_MBikeModel
Public Property Get Model()
Model = x_MBikeModel
End Property
Public Property Let Model(z_Model)
x_MBikeModel = z_Model
End Property
Public Sub Combine()
response.write Make & ” : “ & Model
End Sub
End Class
On the example above, MotorBike Class consists of two private members (the Bike manufacturer and the bike model), four public properties (2 get, 2 set), and a Sub Procedure (combining the bike manufacturer and the bike model).
To use it on your ASP page, add the code below under the class definition, then save it as motor.asp,
Set objMotorBike = New MotorBike
objMotorBike.Make = “KAWASAKI”
objMotorBike.Model = “Ninja ZX-10R”
objMotorBike.Combine()
If you run the page on your browser, the result is the combination of the bike manufacturer property value and the bike name property value outputted by the Combine Sub of the class. I use this feature to create the SimpleGridBuilder, a very simple database driven grid builder.
__________________________
The following posts are programmatically considered as related to the current post by YARPP Plugin:
- SimpleGridBuilder (ASP class definition)
- Runtime-Form-Creation. Automatically creating child forms in a Delphi MDI application with a component array
- Resizing image on the fly with ASP.NET using the System.Drawing namespace
- Replacing and filtering text with regular expression using Delphi, Visual Basic and ASP
Related posts brought to you by Yet Another Related Posts Plugin.
Latest from Programming
- Microsoft Excel Import External Data Problem: When Microsoft Query doesn’t recognize some of your parameters
- SmartImageResizer Plugin, WordPress plugin based on Joe Lencioni’s Smart Image Resizer
- Resize Image or Crop Image with Joe Lencioni’s Smart Image Resizer, WordPress Setup
- Free Softwares to help you learn Regular Expression or to enhance your RegEx skill
- ConsoleProgressBar - Simple Progress Bar Function for your VB.Net Console Application
Leave a Reply
Latest Blog Entries
- Sweet Home 3D, a free home design software
- 26x Optical Zoom on a Compact Digital Camera?
- Windows 7 Release Candidate is now available
- Microsoft Excel Import External Data Problem: When Microsoft Query doesn’t recognize some of your parameters
- The Lack of Chances is the Source of Poverty, Can we make a different?
- SmartFTP Client is no longer Free. What would be the best replacement for it?
- Kantaris Media Player, The most suitable Free Media Player on my Audio Environment
Categories
Neighbours and Friends
- Anti Teori
- Busby SEO Test Page
- Deny Sri
- Digital Media Convert
- Freeware Maniac
- Oeroek
- RidhoCyber
- Suraja Web
Comments - Thanks Guys :)
Therese Lachance: Hi, Any idea how to have ContuttoPDF fetch the correct page language?
Marlena Albu: Super Blog, Dude! I am constantly on the watch for new and interesting sites and postings about audio equipment… which is what...
tresloukadu: yo how did u fixed when the tags shows <? and it shows < “& l t ; ” ?? please send me an email.
Sean: This is a great piece of code and thanks for adding the updates. Sean’s last blog post: Not All Text Message Marketing Is Created...
rodhy: Thank for your code, it very usefull for me. best regard.
Most Popular Entries
- Passing arguments to your VB.NET console application
- ConsoleProgressBar - Simple Progress Bar Function for your VB.Net Console Application
- ASCII To PDU Converter (Convert ASCII to PDU and vice versa)
- An example: Using CPort Delphi Component to read data from your cellphone
- Microsoft Excel Import External Data Problem: When Microsoft Query doesn’t recognize some of your parameters
Software Collections
- Sweet Home 3D, a free home design software
- SmartFTP Client is no longer Free. What would be the best replacement for it?
- Kantaris Media Player, The most suitable Free Media Player on my Audio Environment
- TCPView for Windows, Tool to check TCP and UDP Connections on your system
- The Code Snippet Plugin, my favourite syntax highlighter plugin for WordPress
Blogging Related Stuff
- Change the WordPress permalink structure to the best format, and yes it’s a little bit scary :D
- Something is wrong, the Google Search Result from my blog looks bad, don’t laugh please :D
- Several tips to reduce Blog Noise, especially when your blog covers more than one niche
- How to remove your indexed pages or even your entire site from Google and Yahoo!

















