开发者

Difference between declarative label declarations?

开发者 https://www.devze.com 2022-12-19 08:54 出处:网络
What is the difference between: <asp:Label id=\"label1\" runat=\"server\" Text=\"label\"></asp:Label>

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号