locked
Clone DropDownList RRS feed

  • Question

  • How to clone a dropdownlist?

    <div runat="server" id="Div2" />
        <asp:DropDownList ID="DropDownList1" runat="server" DataSourceID="SqlDataSource2" DataTextField="DES" DataValueField="DES" AppendDataBoundItems="True" Height="20px" Width="200px">
        </asp:DropDownList><br />
        <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:DBConnectionString %>" ProviderName="<%$ ConnectionStrings:DBConnectionString.ProviderName %>" SelectCommand="SELECT * FROM [RESPOSTAS]"></asp:SqlDataSource>
    

    How to create many clones of this ddl in a button click?

    • Moved by Carl Cai Sunday, November 9, 2014 12:23 PM ASP.Net forum is more dedicated(from vb)
    Wednesday, October 29, 2014 3:20 PM

Answers

  • Take the data and fill it again. However, try this forum.

    http://forums.asp.net

    There is not any part VB in your question.


    Success
    Cor

    • Proposed as answer by Carl Cai Sunday, November 9, 2014 12:23 PM
    • Marked as answer by Just Karl Thursday, November 20, 2014 10:30 PM
    Wednesday, October 29, 2014 3:34 PM
  • Why not? If i need to use VB to clone that.

    I think you don't understand.

    In a button click, i need to add this again, to chose another option from a dropdownlist.

    What you will need to do will be about the same whether you code it in VB or C#. Your question is about an ASP.Net DropDownList. The people at forums.asp.net are the experts in that area.
    • Proposed as answer by Carl Cai Sunday, November 9, 2014 12:23 PM
    • Marked as answer by Just Karl Thursday, November 20, 2014 10:30 PM
    Wednesday, October 29, 2014 4:35 PM

All replies

  • Take the data and fill it again. However, try this forum.

    http://forums.asp.net

    There is not any part VB in your question.


    Success
    Cor

    • Proposed as answer by Carl Cai Sunday, November 9, 2014 12:23 PM
    • Marked as answer by Just Karl Thursday, November 20, 2014 10:30 PM
    Wednesday, October 29, 2014 3:34 PM
  • Why not? If i need to use VB to clone that.

    I think you don't understand.

    In a button click, i need to add this again, to chose another option from a dropdownlist.

    Wednesday, October 29, 2014 4:28 PM
  • Why not? If i need to use VB to clone that.

    I think you don't understand.

    In a button click, i need to add this again, to chose another option from a dropdownlist.

    What you will need to do will be about the same whether you code it in VB or C#. Your question is about an ASP.Net DropDownList. The people at forums.asp.net are the experts in that area.
    • Proposed as answer by Carl Cai Sunday, November 9, 2014 12:23 PM
    • Marked as answer by Just Karl Thursday, November 20, 2014 10:30 PM
    Wednesday, October 29, 2014 4:35 PM