Click to See Complete Forum and Search --> : Objects in ASP /VB


Vic
08-09-2006, 10:42 PM
In javascript there is a variable type Object() which allows me to set variable content in the form:
myVariable["Name1"] = "Content1"
myVariable["Name2"] = "Content2"

I was wondering if there is an equivalent variable type in ASP / Visual Basic, and how is it used?

thanks a lot in advance...

russell
08-10-2006, 12:53 PM
typically, objects in asp or vb are instances of classes.

you instantiate them with the set command

Dim o
Set = new myObject

Set o = Server.CreateObject("ProgId.ClassName")

For example...

Dim o
Set o = Server.CreateObject("CDONTS.NewMail")

or for an asp class
Set o = new myClass

You can create asp (or vb) classes and add any members u so choose.