Results 1 to 2 of 2

Thread: ASP: Custom Objects

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2006
    Posts
    13

    ASP: Custom Objects

    Is there a way to have a class definition (in an included file) and instantiate it? for example
    class abc
    dim x
    dim y
    sub sub1
    .....
    .....
    end sub
    end class
    .....
    .....
    .....
    set obj = CreateObject("abc")
    obj.sub1
    ....
    ....
    ...

  2. #2
    Hyperactive Member gtilles's Avatar
    Join Date
    Dec 2004
    Location
    Planet Earth
    Posts
    394

    Re: ASP: Custom Objects

    Yes but you would just dim and set it
    Note: If you do use include for your class you will lose the intellisence
    Works ok if they are on the same page-

    VB Code:
    1. Class [Name of Class]
    2.  
    3. Private Variables
    4. Properties
    5. Methods Events
    6. End Class
    7.  
    8.  
    9. dim objClass
    10. Set objClass=new [Name of Class]
    11.  
    12. objClass.[method goes here]
    Last edited by gtilles; May 2nd, 2006 at 12:59 PM.
    Truly, you have a dizzying intellect.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width