How can i change the textbox into a dropdownlist
Hi guys:
i was trying to change the text box in the Edit template in the form control to a dropdown list. However, when i tried to press the Edit Button to test it, an error page came with a message saying:
Server Error in '/ECBS' Application.
--------------------------------------------------------------------------------
'DepaNameTextBox' has a SelectedValue which is invalid because it does not exist in the list of items.
Parameter name: value
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
what i did is the following change from text box to dropdown list:
DepaName:
<asp:dropdownlist ID="DepaNameTextBox" runat="server" text='<%# Bind("DepaName") %>' Width="137px"></asp:dropdownlist><br />
as you can see the dropdownlist is binded to 'depaName' column. so my next question is, how can i let the dropdown list display the name of the record that was first inserted when i press the edit button to edit that record.
many thanks to any helper
|