i have a aspx page on it i’m dynamically adding the web user controls in a placeholder. and know i have cancel button on the one user control and on click of that Cancel button i want to load other user control inside the aspx page (placeholder).
how can i do that, if i create an event handler in usercontrol then that become null.
thanks
A user control should never, ever have any kind of dependency to the page where it lives. Add an event to the control and fire it from the Cancel button event handler.
From your page, subscribe to the controls’s CancelClicked event and do whatever operation should be done on that other user control.