Posted on: 3/7/2011 1:08:23 AM | Views : 214

Hello
I want to create several instances of a webcontrol on my web page each time the user clicks an 'add' button.
HTML
<asp:Panel ID="pnlInputComplexData" runat="server" Visible="false"> <h2>Wizard - step 2 of 3</h2> <p>We have a template match. Please fill in the data below.</p> <wcLS:LeadStyle ID="wclsLeadStyle" runat="server" /> <asp:Button ID="btnAddLeadStyle" runat="server" Text="Add another lead style" OnClick= "btnAddLeadStyle_Click" /> </asp:Panel>
c#
protected void btnAddLeadStyle_Click(object sender, EventArgs e) { wcLeadStyle wc = new wcLeadStyle(); pnlInputComplexData.Controls.Add(wc); }
Nothing happens when I click the add button. Any ideas?
Dave
...

Go to the complete details ...