?
Solved

ASP: adding tooltip to  <asp:Literal

Posted on 2014-04-22
4
Medium Priority
?
1,614 Views
Last Modified: 2014-04-22
How do i add a tooltip (or text when i hover over) a title with the below code.

      <td>
            <table style="height: 100%;">
                  <tr>
                        <td class="PageTitle" colspan="2">
                              <asp:Literal ID="lblPageTitle" Text="Main page" runat="server"/>
                        </td>
                  </tr>
            </table>
            <div class="BottomBorder">
                        &nbsp;</div>
      </td>
0
Comment
Question by:badtz7229
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 33

Expert Comment

by:Big Monty
ID: 40015894
The Literal control doesn't have any visual appearance on a Web Form but is used to insert literal text into a Web Form. For example if you examine the HTML dump of a page with the following code in it
<asp:Literal ID="lit1" runat="server">some text</asp:Literal>
you will notice that only the text is rendered on the page - that is why there is no tooltip. If you want to have a tooltip on the text, you need to wrap it in some container - DIV, or P for example,  with the corresponding "title" property.
0
 
LVL 33

Accepted Solution

by:
Big Monty earned 2000 total points
ID: 40015899
you could try something like this:

<td>
            <table style="height: 100%;">
                  <tr>
                        <td class="PageTitle" colspan="2">
                              <div title="tooltip text goes here"<asp:Literal ID="lblPageTitle" Text="Main page" runat="server"/></div>
                        </td>
                  </tr>
            </table>
            <div class="BottomBorder">
                        &nbsp;</div>
      </td>

Open in new window

0
 

Author Closing Comment

by:badtz7229
ID: 40016058
thank you . this worked. i also find that changing the tag to a label did the trick


<asp:Label ID="lblPageTitle" Text="Main page" runat="server" ToolTip="tooltip text goes here"></asp:Label>
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses
Course of the Month12 days, 11 hours left to enroll

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question