I have an aspx.
<div id="headerRegion" class="borderDiv">
<xy:paymentHeader id="paymentHeader1" runat="server" />
</div>
<div id="paymentRegion" class="borderDiv">
<asp:UpdatePanel ID="paymentFormUpdater" runat="server">
<ContentTemplate>
<asp:PlaceHolder runat="server" ID="plcPaymentForm" />
</ContentTemplate>
</asp:UpdatePanel>
</div>
on page init, the placeHolder loads an ascx.
private Control GetPaymentControl(char? coverageBenefitPeriod)
{
Control paymentCtl = null;
switch (coverageBenefitPeriod)
{
case 'L':
paymentCtl = this.LoadControl("~/Controls/Lumpform.ascx");
break;
case 'W':
paymentCtl = this.LoadControl("~/Controls/Periodicform.ascx");
break;
default:
paymentCtl = this.LoadControl("~/Controls/Lumpform.ascx");
break;
}
return paymentCtl;
}
plcPaymentForm.Controls.Add(control);
There's a radioButton List on paymentHeader1 control. When I toggle that radio button would like to elegantly swap between Periodicform.ascx and Lumpform.ascx in the placeholder "plcPaymentForm". How do I do this correctly? I am trying not to load both controls and toggle their visibility. If you have any ideas how to do this properly with minimal page interuption please point me in the right direction.
Thanks, ~ck in San Diego