FormView/Insert template / DropdownList / DataBinding

  • Thread starter Thread starter Just Me
  • Start date Start date
J

Just Me

Hi, I have successfully createda table and datasource which I have bound to
the FormView. I can create a record in the table OK.

The problem is that I want to bind a DropDownList selected value to the
datasource.

here is my code, I it simply does not work as the table field ends upo with
NULL

<asp:DropDownList ID="DropDownList1" runat="server" DataValueField='<%#
bind("Gender") %>' >

<asp:ListItem Value="0">Male</asp:ListItem>

<asp:ListItem Value="1">Female</asp:ListItem>

</asp:DropDownList>





Any Ideas ?
 
Dont worry, I needed the Text property, that returned the selected value

Thanks for looking anyway.
 
Back
Top