Nested Dropdown list inside a datalist: Retrieve values

Discussion in 'ASP .Net' started by Mark, Nov 19, 2003.

  1. Mark

    Mark Guest

    Hi, I have a datalist that contains a textbox as well as a dropdown list.

    For each single row in the datalist the associated dropdown list can have at
    least one value

    What I would like to be able to do is when a single update button is clicked
    the textbox value along with the associated dropdown value is printed for
    each row in the datalist.

    The number of rows in the datalist can vary. Here is my Datalist code

    ====================
    <asp:DataList id="DataList1" runat="server" DataKeyField="PersonID">
    <ItemTemplate>
    <asp:TextBox ID="txtName" Runat="server" Text='<%#
    Container.DataItem("Firstname") %>' Enabled="False">
    </asp:TextBox>
    </td>
    <td>
    <asp:DropDownList ID="dlNotChild" Runat="server" DataSource="<%#
    GetNotChild() %>" DataTextField="PersonName" DataValueField="PersonID">
    </asp:DropDownList>
    </td>
    </ItemTemplate>
    </asp:DataList>
    ====================

    The main datalist is bound to a dataview as is the dropdown list
    (GetNotChild routine)

    Thanks for your time
    Regards
    Mark
    Mark, Nov 19, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Scott
    Replies:
    0
    Views:
    348
    Scott
    Oct 15, 2003
  2. Mike
    Replies:
    1
    Views:
    1,824
    Keith Patrick
    Jan 12, 2006
  3. Les Caudle
    Replies:
    0
    Views:
    1,970
    Les Caudle
    May 2, 2006
  4. Mike
    Replies:
    1
    Views:
    137
    Keith Patrick
    Jan 12, 2006
  5. Mike
    Replies:
    1
    Views:
    143
    Keith Patrick
    Jan 12, 2006
Loading...

Share This Page