There are two user controls, which are built dynamically.
In the first control, I am adding a link button, and trying to attach a click event on the same. But the event is not fired.
Actually the main goal is, when the link is clicked, based on which one is clicked, I need to show second control (the values on the new controls are based on the first controls link button that is clicked).
If I use javascript, I will need to use ActiveX or is there any other way to instantiate the second control using javascript
Any other ideas to achieve the scenario “main goal” are welcome
Edit: the linkbutton is not linked to the event at the postback. Can you guys suggest any idea to load another control in any other way?
You need to ensure that the link button is recreated on PostBack, before events are handled. Be weary of where the button is added and when. Also if a control collection is altered (e.g. for example a control is deleted, its id may change and the event handler wont be invoked.!!