locked
User Control within User Control not firing the onclick event RRS feed

  • Question

  • User1848432262 posted

    I have a two user controls - MainControl and ListControl. The ListControl has a list of check boxes with some values and a button. This listcontrol is added dynamically when the user clicks on a link in MainControl. I have an aspx page that has the MainControl and when I load the page I see the MainControl and when user clicks on the link it pops up the ListControl. Problem is when I select the items in the ListControl and click the button. The event button_click is never fired and it goes to the MainControl page_load event and recreates the ListControl. I loose all the selection. How can I persist the selection in ListControl so that I can use that list in MainControl?

    Tuesday, July 12, 2011 12:16 PM