How can I use my custom VB enumerations in ASP?

Results 1 to 3 of 3

Thread: How can I use my custom VB enumerations in ASP?

  1. #1
    Jonathan Fletcher Guest

    Default How can I use my custom VB enumerations in ASP?

    I have developed a series of VB6 components (ActiveX DLL&#039s). I want to use custom enumerations so that in an ASP page I can do something like:<BR><BR>Set obj = Server.CreateObject("Something.somwhere")<BR>obj.P roperty = MyEnumeration<BR><BR>My component works in other VB projects where Intellisense picks everything up properly. However, in Interdev these enumerations or types are not picked up?<BR><BR>Does anyone know why this or how to overcome the problem without using an external inc page (I really want to use Intellisense).<BR><BR>Thanks<BR><BR>jfletcher@redk

  2. #2
    SPG Guest

    Default I think I understand...

    ... and I&#039m afraid you may be out of luck. At least good luck. We&#039ve got a blue light special on sneaky evil solutions, if you&#039re really in need...<BR><BR>You&#039re either trying to use a const or a typeDef you set in VB in ASP.<BR><BR>The strange and slightly evil workaround would be to create another class (or few) in your VB project, which could consist either of read-only properties (to replace the const-s) or read-write properties and semi-static functions (to mimic a typedef).<BR><BR>[for example, the constants would be a class full of <BR><BR>public property get defaultDBconnectString() as string<BR> defaultDBconnectString = "provider ..."<BR>end public<BR><BR>and so on...]<BR><BR>You could then <BR>set myEnum = server.createObject("project.Constants")<BR>objCom ponent.importantProperty = myEnum.readOnlyValue<BR>etc.<BR><BR>It&#039s not particularly good for performance or coding style, but I think it does what you want it to.<BR><BR>If I&#039ve completely misinterpreted the request, feel free to clarify.<BR><BR>SPG

  3. #3
    Jonathan Fletcher Guest

    Default Integrated Development Suite!! Not!

    Yes this is exactly right and was a thought I had myself. However, it seemed a long winded solution to what should be a fairly easy question.<BR><BR>It would seem an obvious thing to do wouldn&#039t it? So much for the integrated development environment!<BR><BR>Thanks<BR><BR>JF<BR><BR>

Posting Permissions

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