mouse over help

Results 1 to 2 of 2

Thread: mouse over help

  1. #1
    Join Date
    Dec 1969

    Default mouse over help

    I have an page where user can see a preview of notes. If they want to add more they can click through to add a new one and view all notes. I have very limited space on the preview page. Is there a way a user could move their mouse over a note (from a datalist) and the full record is shown like a tip does in Word. If anyone can point me to any applications <BR>That do this that would be great<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: mouse over help

    It depends on what controls you are using. Here is a basic example where I add titles to labels:<BR><BR>[code language="C#"]<BR> private void Page_Load(object sender, System.EventArgs e)<BR> {<BR> if(!IsPostBack)<BR> bindData();<BR> }<BR><BR> private void bindData()<BR> {<BR> DataTable dt = new DataTable();<BR> DataColumn dc = new DataColumn("Name", Type.GetType("System.String"));<BR> dt.Columns.Add(dc);<BR> dc = new DataColumn("Interest", Type.GetType("System.String"));<BR> dt.Columns.Add(dc);<BR> DataRow dr = dt.NewRow();<BR> dr[0] = "Mike";<BR> dr[1] = "Likes causing trouble";<BR> dt.Rows.Add(dr);<BR> dr = dt.NewRow();<BR> dr[0] = "Mary";<BR> dr[1] = "Appreciates the little things in life";<BR> dt.Rows.Add(dr);<BR> dr = dt.NewRow();<BR> dr[0] = "Bobby";<BR> dr[1] = "Smokes Weed";<BR> dt.Rows.Add(dr);<BR> this.dlTest.DataSource = dt;<BR> this.dlTest.DataBind();<BR> }<BR><BR> private void dlTest_ItemDataBound(object sender, DataListItemEventArgs e)<BR> {<BR> if(e.Item.ItemIndex &gt; -1)<BR> {<BR> this.lblTest = (Label)e.Item.FindControl("lblTest");<BR> this.lblTest.Attributes.Add("title", DataBinder.Eval(e.Item.DataItem, "Interest").ToString());<BR> }<BR> }<BR><BR>[/code]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts