in your usercontrol you need to create a public event handler
public event EventHandler UpdateParentPage;
and in the event with the usercontrol button pressed, set
protected void btn_Click(object sender, EventArgs e) { if (this.UpdateParentPage != null) UpdateParentPage(sender, e); }
in the code of the parent page behind, set the event handler for your usercontrol:
userControl.UpdateParentPage+= new EventHandler(userControl_UpdateParentPage);
then create a new event handler on the parent page:
protected void userControl_UpdateViewState(object sender, EventArgs e) {
source share