views:

238

answers:

0

Hello Friends,

I have a repeater, which is bound to a Business Object, containing a textbox (Name) and a DropDownList (Date of Birth). how can i edit the bound object with the selectedvalue from the dropdown?

For example

The first Object has these values (Name: Dave, DOB: 1982) The second object has these values (Name: Tim, DOB: 1970)

I then change Dave's DOB to 1962, using the dropdownlist, how can i make sure the Datasourse (being the Business Object) get updated?

here is the repeater control (the datasource is set in the code behing to a List)

<asp:repeater id="listPeople" Runat="server">
<ItemTemplate>
<tr>
<td><%# DataBinder.Eval(Container.DataItem, "Name")%></td>
<td><asp:DropDownList ID="ddl1" runat="server">
<asp:ListItem>1982</asp:ListItem>
<asp:ListItem>1962</asp:ListItem>
<asp:ListItem>1970</asp:ListItem>
</asp:DropDownList>
</td>
</tr>
</ItemTemplate>
</asp:repeater>