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. Advertisements

  2. I figuered it out. Any control in which you dynamically
    load must be reloaded every time on postback events.
     
    developer1996, Jul 7, 2003
    #2
    1. Advertisements

  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.
     
    Victor Garcia Aprea [MVP], Jul 8, 2003
    #3
    1. Advertisements

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.