开发者

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.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜