DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: Does ASP support event handling for COM components

  1. #1
    jlewin Guest

    Does ASP support event handling for COM components


    I've used ASP since 97, but somehow I've never noticed my lack of event based
    programming. Is there any way to load a COM object and define it's event
    handler? I thought the following code would work.

    <%
    sub x_event(arg, arg)
    respose.write "event handler"
    end sub

    dim x as object
    set x = createobject("some.thing")
    x.add "y"
    %>

    Since this doesn't work, and I've never tried it, maybe events aren't supported?



  2. #2
    Michael Culley Guest

    Re: Does ASP support event handling for COM components

    jlewin,

    as far as I know events are not supported. They wouldn't make much sense
    anyway even if they were. The events would have to fire in response to some
    property or method call, in which case the code could just be put after the
    call anyway.

    --
    Michael Culley
    www.vbdotcom.com


    "jlewin" <jlewin@mail.com> wrote in message news:3b7de1fc$1@news.devx.com...
    >
    > I've used ASP since 97, but somehow I've never noticed my lack of event

    based
    > programming. Is there any way to load a COM object and define it's event
    > handler? I thought the following code would work.
    >
    > <%
    > sub x_event(arg, arg)
    > respose.write "event handler"
    > end sub
    >
    > dim x as object
    > set x = createobject("some.thing")
    > x.add "y"
    > %>
    >
    > Since this doesn't work, and I've never tried it, maybe events aren't

    supported?
    >
    >




  3. #3
    John Guest

    Re: Does ASP support event handling for COM components


    This is a true statement, however this will be changing with .NET as there
    is a much closer relationship with the communication between the client and
    the server.

    John

    "Michael Culley" <m_culley@one.net.au> wrote:
    >jlewin,
    >
    >as far as I know events are not supported. They wouldn't make much sense
    >anyway even if they were. The events would have to fire in response to some
    >property or method call, in which case the code could just be put after

    the
    >call anyway.
    >
    >--
    >Michael Culley
    >www.vbdotcom.com
    >
    >
    >"jlewin" <jlewin@mail.com> wrote in message news:3b7de1fc$1@news.devx.com...
    >>
    >> I've used ASP since 97, but somehow I've never noticed my lack of event

    >based
    >> programming. Is there any way to load a COM object and define it's event
    >> handler? I thought the following code would work.
    >>
    >> <%
    >> sub x_event(arg, arg)
    >> respose.write "event handler"
    >> end sub
    >>
    >> dim x as object
    >> set x = createobject("some.thing")
    >> x.add "y"
    >> %>
    >>
    >> Since this doesn't work, and I've never tried it, maybe events aren't

    >supported?
    >>
    >>

    >
    >



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center