FormView/Insert template / DropdownList / DataBinding

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 ?
 
J

Just Me

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

Thanks for looking anyway.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,007
Latest member
obedient dusk

Latest Threads

Top