/// <summary> /// This hands control off to the presenter to raise the event that the user is requesting /// to add a new customer; alternatively, you could have the user control raise the event itself. /// The downside is that, in some cases, the ASPX page may end up having to register for events with both the user control *and* the presenter. /// </summary> protected void btnAddCustomer_OnClick(object sender, EventArgs e) { presenter.AddCustomer(); }
protected void btnAdd_OnClick(object sender, EventArgs e) { presenter.AddCustomer(Page.IsValid); }