Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8525235
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T07:55:06+00:00 2026-06-11T07:55:06+00:00

I am using the library using System.Web.UI.WebControls; to extract data from a SQL table

  • 0

I am using the library using System.Web.UI.WebControls; to extract data from a SQL table and put them as the listitem. However, when the user hovers over the item, it should display the text (the text of the listitem the cursor is hovering). I read that you need to use the System.Windows.Forms; library but I don’t know how that will work with populating the listbox with sql rows.

Someone help me how to populate a listbox from an sql table and use the mouseover event to display the listitem text?

I’m using C#, asp.net and visual studio (sql manangemetn 2005).


Edit ondatabound

protected void test123(object sender, EventArgs e) 
{ 
    foreach (ListItem item in lstService.Items) 
    { 
        item.Attributes.Add("title", item.Value); 
    } 
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T07:55:08+00:00Added an answer on June 11, 2026 at 7:55 am

    You don’t need to use any controls; just add the standard HTML attribute title to your list item, and that will display the tooltip / mouseover popup.

    <asp:ListBox ID="mylist" runat="server">
        <asp:ListItem Text="item1" Value="value1" title="tooltip here" />
    </asp:ListBox>
    

    To bind them to a data value, you could either extend the ListBox class, or just iterate over the items in the OnDataBound event:

    foreach (ListItem item in mylist.Items) item.Attributes.Add(title, item.Value);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using the ASP.NET charting library (System.Web.UI.DataVisualization.Charting) and the SeriesChartType enumeration has a ton
I am trying to load a shared library using: System.loadLibrary(sharedC); sharedC is dependent on
Using techniques as hinted at in: http://msdn.microsoft.com/en-us/library/system.servicemodel.servicecontractattribute.callbackcontract.aspx I am implementing a ServerPush setup for
I'm using the' System.Windows.Forms.DataVisualization.Charting ' library for my chart and I was wondering if
I'm using the tag-it library for jquery to make a tagging system (a bit
using stdout library it will maybe pass data to logcat or somewhere else which
Im using this library to parse CSV files in my GWT app. However, It
http://msdn.microsoft.com/en-us/library/system.web.ui.datavisualization.charting.chart.click.aspx The event handler: protected void Chart1_Click(object sender, ImageMapEventArgs e) { //stuff } I
What library I need to reference to use System.Web.Script.Serialization in Class Library ? System.Web
I'm using the RazorEngine library ( http://razorengine.codeplex.com/ ) in an MVC 3 web application

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.