开发者

Trying to add a title property to a label to use in a webpartcontrol

开发者 https://www.devze.com 2023-03-20 00:51 出处:网络
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:

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.

0

精彩评论

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