How to use tooltip on PlaceHolder?

I have a control in ASP.NET 4.0 C #. I displayed data from my drive D (means mapping files and folders from my drive to a web page using a placeholder) to a web page.

Now that I am above the placeholder string, I want to display the text using ToolTip or any other control.

There are many examples for GridView , ListBox , etc., but I can not find an example for PlaceHolder .

+4
source share
2 answers

Wrap your placeholder panel and bring up a tooltip toolbar.

    <asp:Panel ID="Panel1" runat="server" ToolTip="this is a placeholder tooltip example.">
        <asp:PlaceHolder ID="PlaceHolder1" runat="server">
            <span>Sample text</span>
        </asp:PlaceHolder>
    </asp:Panel>
+1
source

The placeholder does not really exist. This is just the placeholder that ASP uses during the page life cycle. As the page loads, ASP places the specified controls in the owner’s place. If you look at the HTML markup on the render page, then there is no placeholder — only the controls you made.

To solve this problem, I usually wrapped the placeholder inside the panel. Then set the tooltip on the panel.

+1
source

Source: https://habr.com/ru/post/1529057/


All Articles