.aspx.cs
lbtnTxn.Attributes.Add("onmouseover", "showTooltip(" + strJSValues.ToString() + ");"); lbtnTxn.Attributes.Add("onmouseout", "HideTooltip();");
.aspx
<script type="text/javascript" language="javascript">
function showTooltip(name, AccNo, Product)
{
document.getElementById("tdName").innerText = "Name : " + name; document.getElementById("tdAcNum").innerText = "Account No : " + AccNo;
x = event.clientX + document.body.scrollLeft-10;
y = event.clientY + document.body.scrollTop + 20;
pop.style.display = "block";
pop.style.left = x - 10;
pop.style.top = y - 50;
}
function HideTooltip()
{
pop.style.display = "none";
}
</script>
<div id="pop"> <table border="1" cellpadding="1" cellspacing="1" style="width: 98%px;">
<tbody>
<tr>
<td id="tdName"></td>
</tr>
<tr>
<td align="left" class="runtext" id="tdAcNum"></td>
</tr>
</table>
</div>
This code can help for Dynamic ToolTip For linkbutton in asp.net
No comments:
Post a Comment
Comments