How to open modalpopup by using OnMouseOver ?

Last post 05-22-2008 2:32 AM by blodfox777. 3 replies.

Sort Posts:

  • How to open modalpopup by using OnMouseOver ?

    05-21-2008, 2:40 PM
    • Member
      22 point Member
    • itman21c
    • Member since 02-22-2008, 7:16 AM
    • Posts 68

    Hi.

    Now I am tryting to open ajax popup by using onmouseover of Label control.

    I added onmouseover and onmouseout attribute to label control in gridview itemtemplate.

     If e.Row.RowType = DataControlRowType.DataRow Then
                Dim lblName As Label = CType(e.Row.FindControl("lblFullName"), Label)
                lblName.Attributes.Add("onmouseover", "ShowTooltip()")
                lblName.Attributes.Add("onmouseout", "HideTooltip()")
    End If

    Private Sub ShowTooltip()

    modalpopup.show()

    End Sub 

    private Sub HideTooltip()

    modalpopup.hide()

    End Sub

    But I couldn't get any response.

    Is there any way to show ajax modalpopup by using onmouseover and onmouseout attribute of label control ?

     

  • Re: How to open modalpopup by using OnMouseOver ?

    05-21-2008, 11:04 PM
    • Participant
      1,092 point Participant
    • blodfox777
    • Member since 07-12-2007, 8:30 AM
    • Posts 159

    Hi

    F.Y.I

    I know you want add the attributes to every labels in your itemtemplate

    but i think there is something wrong in the way you find the label

    CType(e.Row.FindControl("lblFullName"), Label) //try to use client name instead of "lblFullName" please

    Hope this helps

     

    Regards!

    -- "Mark As Answer" If my reply helped you --
  • Re: How to open modalpopup by using OnMouseOver ?

    05-22-2008, 2:16 AM
    • Member
      22 point Member
    • itman21c
    • Member since 02-22-2008, 7:16 AM
    • Posts 68

    Hi. BlodFox

    How to use client name of lable control ?

    Could you show me the simple code ?

     thanks

  • Re: How to open modalpopup by using OnMouseOver ?

    05-22-2008, 2:32 AM
    Answer
    • Participant
      1,092 point Participant
    • blodfox777
    • Member since 07-12-2007, 8:30 AM
    • Posts 159

    Hi

    do a ViewSource to your web page

     you can see the controls in the itemtemplete

    their client names and id is defferent from their server name

    for example:

    a CheckBox1 in GridView1 's templete column will be

    <input id="GridView1_ctl01_CheckBox1" type="checkbox" name="GridView1$ctl01&CheckBox1"/>

    <input id="GridView1_ctl02_CheckBox1" type="checkbox" name="GridView1$ctl02&CheckBox1"/>

    <input id="GridView1_ctl03_CheckBox1" type="checkbox" name="GridView1$ctl03&CheckBox1"/>

    …………

    so, you can find the label by the client name or id 

    Hope this helps

    Regards!

    -- "Mark As Answer" If my reply helped you --
Page 1 of 1 (4 items)