View Single Post
  #1 (permalink)  
Old December 29th, 2015, 01:53 AM
SunsetFlorida SunsetFlorida is offline
Registered User
Points: 24, Level: 1
Points: 24, Level: 1 Points: 24, Level: 1 Points: 24, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2011
Posts: 5
Thanks: 3
Thanked 1 Time in 1 Post
Default Element 'ListItem' is not known element .... in my DropDownList

Hi

I added <asp:ListItem Value="">Make a selection</asp:ListItem> with AppendDataBoundItems="True" on Step 13 on P488. I got the message;
Element 'ListItem' is not known element ....

Can you tell me why I have this message? Thanks
Han

<asp:TemplateField HeaderText="GenreId" SortExpression="GenreId">
<EditItemTemplate>
<asp:DropDownList ID="ddlGenre" AppendDataBoundItems="True" runat="server" DataSourceID="GenreDataSource" DataTextField="Name" DataValueField="Id" SelectedValue='<%# Bind("GenreId") %>'></asp:DropDownList>
<asp:ListItem Value="">Make a selection</asp:ListItem>
</EditItemTemplate>
<InsertItemTemplate>
<asp:DropDownList ID="ddlGenre" AppendDataBoundItems="True" runat="server" DataSourceID="GenreDataSource" DataTextField="Name" DataValueField="Id" SelectedValue='<%# Bind("GenreId") %>'></asp:DropDownList>
<asp:ListItem Value="">Make a selection</asp:ListItem>
</InsertItemTemplate>
<ItemTemplate>
<asp:Label ID="Label4" runat="server" Text='<%# Bind("GenreId") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
Reply With Quote
The Following User Says Thank You to SunsetFlorida For This Useful Post: