Hi
I have below code & when user hovers on Name i want in popup it should display more information like this. Code is in code-behind
JavaScript
htmlTable.Append("" + Utility.GetOrdinalNo(Convert.ToInt32(colum.Segment)) + "");
htmlTable.Append("" + Convert.ToDateTime(colum.SessionDate).ToString("dd-MM-yyyy") + "");
htmlTable.Append("" + colum.UserDetail.Name + "");Father Name - aaa
Mother Name - bbb
Age - 20
Thanks

Tuhin PaulRank #7 · 71.9K reputationPosted Apr 1, 2023, 2:55 AM EDT
htmlTable.Append("" + Utility.GetOrdinalNo(Convert.ToInt32(colum.Segment)) + ""); htmlTable.Append("" + Convert.ToDateTime(colum.SessionDate).ToString("dd-MM-yyyy") + ""); // Add a tooltip with more information about the user htmlTable.Append("" + colum.UserDetail.Name + "");I've added a "title" attribute to the "td" tag that contains the name of the user. The value of the "title" attribute is a string that contains the additional information about the user (father name, mother name, and age) separated by line breaks ("
"). When the user hovers over the name, the browser will display a tooltip with the additional information.
Tuhin PaulRank #7 · 71.9K reputationPosted Apr 1, 2023, 2:57 AM EDT
You can also Add CSS styles to create the appearance of the tooltip
td[title]:hover:after { content: attr(title); padding: 5px; color: #000; position: absolute; z-index: 9999999; white-space: pre-wrap; background-color: #fff; border: 1px solid #ccc; border-radius: 5px; font-size: 14px; font-weight: normal; max-width: 400px; }Tuhin PaulRank #7 · 71.9K reputationPosted Apr 1, 2023, 2:57 AM EDT
My css code creates a pseudo-element (":after") that displays the tooltip text when the user hovers over the "td" element.
Ramco RamcoRank #462 · 5.4K reputationPosted Apr 1, 2023, 3:03 AM EDT
Hi Tuhin
My issue is when it hovers then i want to this process & the list returned i want to display in ToolTip
BALSessionDeliveryParticipant bALSessionDeliveryParticipant = new BALSessionDeliveryParticipant(); List objStudentList = bALSessionDeliveryParticipant.GetSessionDeliveryDetailsByCalendarID(colum.SessionDeliveryCalendarID); BALStudents bALStudents = new BALStudents(); if (objStudentList != null) { foreach (var colum1 in objStudentList) { StudentDetail objResult = bALStudents.GetStudentDetailByLoginID(Convert.ToInt32(colum1.StudentID)); if (colum1.PresentInSession == true) htmlTable.Append("" + objResult.Name + ""); else { if (colum1.OnBreak == false) htmlTable.Append("" + objResult.Name + ""); else htmlTable.Append("" + objResult.Name + ""); } } }Thanks