Difference between declarative label declarations?
What is the difference between:
<asp:Label id="label1" runat="server" Text="label"></asp:Label>
and
<asp:Label id="label1" runat="server">label</开发者_如何学Goasp:Label>
The same question can be applied to something like a ListItem for a DropDownList as well such as:
<asp:ListItem Text="Item" runat="server"></asp:ListItem>
as opposed to
<asp:ListItem runat="server">Item</asp:ListItem>
This Label MSDN Definition says that the "Text" field is simply the ControlValuePropertyAttribute, meaning inner content is bound to that Property.
This ListItem MSDN Definition shows a matrix on how it handles the inner content.
精彩评论