The way the solution should work: Choose something in dropdownlist and go into the values in textbox. Click Add button. Another row of recent dropdownlist and textbox should appear.

The prior textbox helps you to save the joined value, however the previous dropdownlist won't.

Any idea how you can solve this issue?

I know in your mind, however i believe it isn't a really wise method of doing it, but you will find other techniques to resolve this problem.

in arrears.aspx.cs:

public partial class _Default : System.Web.UI.Page



    

    protected void repeatAddress_ItemCommand(object source, RepeaterCommandEventArgs e)

    Products.Count //get total products in repeater

        if (e.CommandName == "Add")

        due to add

            AddColumns()

            foreach (RepeaterItem item in repeatAddress.Products)

            joined values in table

                tbDummy.Rows.Add(addType, addAddress, addCountry, addPostal, "Remove")

            

            //Add dummy row, because we have to increase

            tbDummy.Rows.Add("", "", "", "", "Add")

            BindWithRepeater()

        

        else if (e.CommandName == "Remove")

        Posts.Add("Type")

            tbDummy.Posts.Add("Address")

            tbDummy.Posts.Add("Country")

            tbDummy.Posts.Add("Postal")

            tbDummy.Posts.Add("Button")

            foreach (RepeaterItem item in repeatAddress.Products)

            

                    else

                    

                

            

            BindWithRepeater()

        

    

    private void AddColumns()

    Posts.Add("Type")

        tbDummy.Posts.Add("Address")

        tbDummy.Posts.Add("Country")

        tbDummy.Posts.Add("Postal")

        tbDummy.Posts.Add("Button")

    

    private void BindWithRepeater()

    

    protected void ddlAddressType_DataBinding(object sender, EventArgs e)

    nations = File.ReadAllLines("/AddressType.txt")

        foreach (string item in nations)

        Products.Add(ddlItem)

        

        ddl.SelectedValue = ddl.SelectedValue

    

    protected void ddlCountry_DataBinding(object sender, EventArgs e)

    nations = File.ReadAllLines("/ListofCountries.txt")

        foreach (string item in nations)

        Products.Add(ddlItem)

        

        ddl.SelectedValue = ddl.SelectedValue

    



xxxxxxx_DataBinding is needed otherwise the mistake "xxx includes a SelectedValue that is invalid because it doesn't appear in their email list of products. Parameter title: value" can look. By which I have published an issue regarding that problem right here: Dynamic dropdownlist in repeater, ASP.Internet (solved)

in arrears.aspx:

        <asp:Repeater ID="repeatAddress" runat="server" OnItemCommand="repeatAddress_ItemCommand">

            <HeaderTemplate>

                <table>

                    <tr>

                        <th>

                            Type

                        </th>

                        <th>

                            Address

                        </th>

                        <th>

                            Country

                        </th>

                        <th>

                            Postal Code

                        </th>

                    </tr>

            </HeaderTemplate>

            <ItemTemplate>

                <tr>

                    <td>

                        <asp:DropDownList ID="ddlAddressType" runat="server" Width="100px" SelectedValue='<%# DataBinder.Eval(Container.DataItem, "Type") %>'

                            OnDataBinding="ddlAddressType_DataBinding">

                        </asp:DropDownList>

                    </td>

                    <td>

                        <asp:TextBox ID="txtAddress" runat="server" Width="190px" Text='<%# DataBinder.Eval(Container.DataItem, "Address") %>'></asp:TextBox>

                    </td>

                    <td>

                        <asp:DropDownList ID="ddlCountry" runat="server" OnDataBinding="ddlCountry_DataBinding"

                            Width="170px" SelectedValue='<%# DataBinder.Eval(Container.DataItem, "Country") %>'>

                        </asp:DropDownList>

                    </td>

                    <td>

                        <asp:TextBox ID="txtPostal" runat="server" Width="80px" Text='<%# DataBinder.Eval(Container.DataItem, "Postal") %>'></asp:TextBox>

                    </td>

                    <td>

                        <asp:Button ID="btnAddAnother" CausesValidation="False" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Button") %>'

                            CommandName='<%# DataBinder.Eval(Container.DataItem, "Button") %>' />

                    </td>

                </tr>

            </ItemTemplate>

            <FooterTemplate>

                </table>

            </FooterTemplate>

        </asp:Repeater>

Download link for solution if needed ( http://world wide web.largedocument.com/B/39509a11/WebSite1.zip )

The initial working codes for textbox is located here: http://ranafaisal.wordpress.com/2009/02/17/dynamically-adding-getting rid of-textboxes-in-aspnet-repeater/