469,609 Members | 1,634 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,609 developers. It's quick & easy.

Nested Dropdown list inside a datalist: Retrieve values

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
Nov 18 '05 #1
0 1789

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Phil Townsend | last post: by
reply views Thread by Marty U. | last post: by
1 post views Thread by Adam Knight | last post: by
5 posts views Thread by jung_h_park | last post: by
1 post views Thread by Roffers | last post: by
5 posts views Thread by John Kotuby | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.