I'm trying to add a title to web label control. H开发者_如何学运维ere is the code where I am trying to use a title on a label:
<asp:WebPartZone ID="WebPartZone1" runat="server"
HeaderText="Welcome to my web page!"
LayoutOrientation="horizontal" Width="160px">
<ZoneTemplate>
<asp:Label ID="Label1" runat="server" Text="Label"
**Title**="Welcome to my web page!">
Welcome to the page!
</asp:Label>
</ZoneTemplate>
Any help will be greatly appreciated.
Tom Magaro
What are you trying to do with the Title specifically? If you want a custom property on a label control you will need to create a custom control that inherits from the Label control. If you just want to set the text then use the Text property. If you want a tooltip then set the ToolTip property.
精彩评论