zimmer9
asked on
Do you know how I can resolve the error 'asp:ListItem' does not allow child objects. This occurs in an ASPX file when using VS2010 and C#?.
I am writing an application in ASP.NET using C# and Visual Studio 2010.
Do you know how I can resolve the following error in my .ASPX file as follows:
The Text property of 'asp:ListItem' does not allow child objects.
-----------
<ItemStyle HorizontalAlign="Left"></I temStyle>
</asp:TemplateField>
<asp:TemplateField HeaderText="How Received" ItemStyle-HorizontalAlign= "Left">
<EditItemTemplate>
<asp:DropDownList ID="drpRecv" Width="60px" runat="server" SelectedValue='<%#Eval("ho wRecieved" ) %>'>
<asp:ListItem Value="Bits"></asp:ListIte m>
<asp:ListItem Value="E-Mailed"></asp:Lis tItem>
<asp:ListItem Value="Faxed"></asp:ListIt em>
<asp:ListItem Value="Mail">/asp:ListItem >
</asp:DropDownList>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="lblhowRecieved" runat="server" Text='<%# Eval("howRecieved") %>'></asp:Label>
</ItemTemplate>
Do you know how I can resolve the following error in my .ASPX file as follows:
The Text property of 'asp:ListItem' does not allow child objects.
-----------
<ItemStyle HorizontalAlign="Left"></I
</asp:TemplateField>
<asp:TemplateField HeaderText="How Received" ItemStyle-HorizontalAlign=
<EditItemTemplate>
<asp:DropDownList ID="drpRecv" Width="60px" runat="server" SelectedValue='<%#Eval("ho
<asp:ListItem Value="Bits"></asp:ListIte
<asp:ListItem Value="E-Mailed"></asp:Lis
<asp:ListItem Value="Faxed"></asp:ListIt
<asp:ListItem Value="Mail">/asp:ListItem
</asp:DropDownList>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="lblhowRecieved" runat="server" Text='<%# Eval("howRecieved") %>'></asp:Label>
</ItemTemplate>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.