I am using nested repeater and child repeater has a user control in it.
<asp:repeater>
<asp:repeater>
<uc:userControl />
</asp:repeater>
</asp:repeater>
UserControl saves the information in database and raise the itemsaved event passing success message as event args.
I do have public event in usercontrol that will be raised but there is no way I can bind that event in the main page. (it would be really good if I can do that).
But I found another way to handle it in parent repeater's itemcommand. First it will fire usercontrol's button event and then repeater's itemcommand. I can recognize that usercontrol's event in itemcommand but how do I pass whether the information saved successfully or not? Is there any way I can pass true/false(successful save or not) from usercontrol's button event to itemcommand event?
You can handle your UserControl's event in the page. You have to add the handler in ItemCreated-event of your inner repeater.
Here is a working example(VB.Net):
Main-Page codebehind:
aspx:
The usercontrol's codebehind:
and its ascx: