Click event not firing with custom control

Discussion in 'ASP .Net Web Controls' started by Zane, Oct 30, 2003.

  1. Zane

    Zane Guest

    Hi all,

    I have created a custom control library in Visual
    Studio .NET 2003 using .NET framework 1.1 on Server 2003.

    The problem is when I promatically add a click event to a
    button within a custom web control it won't work unless
    it has a property attached to the class (IE like text for
    the button and that also the property is using the method
    EnsureChildControl()).

    When you go to internet explorer and click the button it
    doesn't work. But it you have the property in there with
    the EnsureChildControl method it works.

    This isn't one off thing either, as it has happened to me
    many times with other configurations. Is this a bug??
    Because I'm ready to destroy the PC.

    Any ideas??

    thanks

    Zane
     
    Zane, Oct 30, 2003
    #1
    1. Advertising

  2. Zane

    Tim T Guest

    I think i'm having the same problem
    hopefully someone will respond to my most recent post with good answers

    Tim T

    "Zane" <> wrote in message
    news:07c501c39e8e$e97528e0$...
    > Hi all,
    >
    > I have created a custom control library in Visual
    > Studio .NET 2003 using .NET framework 1.1 on Server 2003.
    >
    > The problem is when I promatically add a click event to a
    > button within a custom web control it won't work unless
    > it has a property attached to the class (IE like text for
    > the button and that also the property is using the method
    > EnsureChildControl()).
    >
    > When you go to internet explorer and click the button it
    > doesn't work. But it you have the property in there with
    > the EnsureChildControl method it works.
    >
    > This isn't one off thing either, as it has happened to me
    > many times with other configurations. Is this a bug??
    > Because I'm ready to destroy the PC.
    >
    > Any ideas??
    >
    > thanks
    >
    > Zane
     
    Tim T, Oct 30, 2003
    #2
    1. Advertising

  3. Zane

    Guest Guest

    A work around I use now is to create a string that is
    empty and assign a property to the class using it. This
    way it ensure the control click events work and it doen't
    interfere with the controls logic. Unfortunatly you will
    have a control with an extra property that doesn't do
    anything.

    Zane


    >-----Original Message-----
    >I think i'm having the same problem
    >hopefully someone will respond to my most recent post

    with good answers
    >
    >Tim T
    >
    >"Zane" <> wrote in

    message
    >news:07c501c39e8e$e97528e0$...
    >> Hi all,
    >>
    >> I have created a custom control library in Visual
    >> Studio .NET 2003 using .NET framework 1.1 on Server

    2003.
    >>
    >> The problem is when I promatically add a click event

    to a
    >> button within a custom web control it won't work unless
    >> it has a property attached to the class (IE like text

    for
    >> the button and that also the property is using the

    method
    >> EnsureChildControl()).
    >>
    >> When you go to internet explorer and click the button

    it
    >> doesn't work. But it you have the property in there

    with
    >> the EnsureChildControl method it works.
    >>
    >> This isn't one off thing either, as it has happened to

    me
    >> many times with other configurations. Is this a bug??
    >> Because I'm ready to destroy the PC.
    >>
    >> Any ideas??
    >>
    >> thanks
    >>
    >> Zane

    >
    >
    >.
    >
     
    Guest, Oct 30, 2003
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. ~~~ .NET Ed ~~~
    Replies:
    3
    Views:
    15,186
    nizarbabu
    Sep 8, 2008
  2. GauravGupta
    Replies:
    4
    Views:
    2,157
    Shilpa1234
    Jan 19, 2012
  3. ADN
    Replies:
    0
    Views:
    858
  4. Shannon Cayze

    Event handler not firing in custom control

    Shannon Cayze, Dec 1, 2008, in forum: ASP .Net
    Replies:
    2
    Views:
    3,415
    elizas
    Apr 22, 2010
  5. irislogic_1

    Custom Control Click Event not firing.

    irislogic_1, Jan 5, 2005, in forum: ASP .Net Web Controls
    Replies:
    2
    Views:
    174
    Mike MacMillan
    Jan 9, 2005
Loading...

Share This Page