I am trying to bind data from DropDownList in ListView in EditItemTemplate but it didn’t work.
Code:
<asp:DropDownList ID="DropDownList1" runat="server" SelectedValue='<%# Bind("type")%>'>
<asp:ListItem Text="Fatwa" Value="1"></asp:ListItem>
<asp:ListItem Text="Interviewer" Value="2"></asp:ListItem>
<asp:ListItem Text="Programs" Value="3"></asp:ListItem>
</asp:DropDownList>
My code working well but I forgot to type DataKeyNames in listview 😀