p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: Beginning ASP.NET 4.5 : in C# and VB (http://p2p.wrox.com/forumdisplay.php?f=710)
-   -   Element 'ListItem' is not known element .... in my DropDownList (http://p2p.wrox.com/showthread.php?t=95394)

SunsetFlorida December 29th, 2015 01:53 AM

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>

SunsetFlorida December 29th, 2015 02:12 AM

I got it. Never mind. Thanks.


All times are GMT -4. The time now is 05:04 PM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.