LinkButton won't work.

I have inherited a C# ASP.Net web app which I am modifying. It contains a user control with link buttons dynamically placed into a panel. When they are clicked it fires an event and executes the event within the control, and then bubbles it up to the main page which fires the event.

There's another user control with an htmltable in it. I copied the code from the first user control into the secoond to populate datacells with linkbuttons, along with the event driver which bubble the events up to the main page. However, the link buttons in the htmltable datacells don't work. The text appears, but they don't do anything when you click them. I must be missing something somewhere.


  • When you create a link button dynamically be sure that you do not miss to assign a method which processes onclick event

    myButton.Click += ClickProcessimgMethod; (here you do not indicate parameters

    protected void ClickProcessingMethod(object sender, EventArgs e)
    ... and here you throw an event to main form or do something else ...

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


In this Discussion