I have now 3 hours of experience (tryence) in ASP.NET Web Forms. I'm so used to HTML that I need some help to get out of the box.
What I'm trying to do is a simple Element inside Element, but it keeps saying that "the element is not known".
What I need is:
<ul>
<li>
<div>TEST</div>
</li>
</ul>
What I'm trying is:
<asp:BulletedList ID="BulletedList1" runat="server">
<asp:ListItem>
<asp:Panel runat="server">TEST</asp:Panel>
</asp:ListItem>
</asp:BulletedList>
This is not working and I would like to understand why?
You cannot add elements inside asp:ListItems, you can only set the Value and Text property of them
<asp:ListItem Text="Test" Value="Test"></asp:ListItem>
There's no real reason you couldn't use standard HTML controls and that will achieve what you want
<ul>
<li>
<div id="testDiv" runat="server">TEST</div>
</li>
</ul>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With