Bind multiple values in a tooltip in

Oct 30, 2015 By Mohammed Imtiyaz




Tooltips are a great way to show your user more information by simply hovering over an image or text. They can be used, for example, to provide captions for images, or longer descriptions for links, or any useful information which would improve the user experience of your site, without interfering the web page design.

Today I’m going to show you how to add multiple parameters in a tooltip in

Let us say we have asp:gridview control where we are binding the database table column (Ex: Employee Name), now let us assume that we want to display more information about the employee like email, branch, etc.. when we place the mouse over it.

It can be displayed by using “Tooltip” tag for that control.

Let us see the code below


<asp:GridView ID="gvEmployee" runat="server">




                        <asp:CheckBox ID="cbEmployeeList"


                            Text='<%# Eval("emp_name") %>'

                            ToolTip='<%# "Name: " + Eval("emp_name") + "\n" +

                                         "Email: " + Eval("emp_email") + "\n" +

                                         "Branch: " + Eval("branch_name") %>' />