Cannot recieve click event on Link Button

Discussion in 'ASP .Net Building Controls' started by developer1996, Jul 7, 2003.

  1. I have created a Web User Control with a link button on
    it. I dynamically load this control on my default page.
    In the Click event on my control I set x = 5. I just want
    to see if I can generate and trap an event with in my
    control but unfortuanetely I cannot. It appears events
    are not being processed by my Web User Control. I know
    this can be done can anyone help?
     
    developer1996, Jul 7, 2003
    #1
    1. Advertising

  2. I figuered it out. Any control in which you dynamically
    load must be reloaded every time on postback events.
    >-----Original Message-----
    >I have created a Web User Control with a link button on
    >it. I dynamically load this control on my default page.
    >In the Click event on my control I set x = 5. I just want
    >to see if I can generate and trap an event with in my
    >control but unfortuanetely I cannot. It appears events
    >are not being processed by my Web User Control. I know
    >this can be done can anyone help?
    >.
    >
     
    developer1996, Jul 7, 2003
    #2
    1. Advertising

  3. Also, make sure you're adding the control at Init or Load to ensure proper
    handling of viewstate, event-firing, etc

    --
    Victor Garcia Aprea
    Microsoft MVP | ASP.NET
    Looking for insights on ASP.NET? Read my blog:
    http://obies.com/vga/blog.aspx

    To contact me remove 'NOSPAM'. Please post all questions to the newsgroup

    and not by private mail.
    "developer1996" <> wrote in message
    news:78ee01c344a7$3e5ac870$...
    > I figuered it out. Any control in which you dynamically
    > load must be reloaded every time on postback events.
    > >-----Original Message-----
    > >I have created a Web User Control with a link button on
    > >it. I dynamically load this control on my default page.
    > >In the Click event on my control I set x = 5. I just want
    > >to see if I can generate and trap an event with in my
    > >control but unfortuanetely I cannot. It appears events
    > >are not being processed by my Web User Control. I know
    > >this can be done can anyone help?
    > >.
    > >
     
    Victor Garcia Aprea [MVP], Jul 8, 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.

Share This Page