Author: Bobby-Z | Posted on: 5/26/2009 12:43:24 PM | Views : 504

I have made a custom formview Editor for a database table, but some columns are meant to only have 5 different options for them, like customerType, but a textbox will allow you to enter anything, So in the edit mode I would like to have a dropdownlist instead, how do I bind that to the record I am editin, or creating?
 <asp:TextBox CssClass="txtboxlg" ID="CustomerTypeTextBox" runat="server" Text='<%# Bind("CustomerType") %>' />  right now this is what I have (automatically created with the formview control) I would like to replace it with this:
 <asp:DropDownList CssClass="drpdwn" ID="CouponCodeDropDown" runat="server" > <asp:ListItem>Commercial</asp:ListItem> <asp:ListIt ...

Go to the complete details ...