Click here to Skip to main content
15,949,741 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
See more:
hi to all,
I am developing a website that have various modules.
It have EMPCODE on various forms as link button.
I want to show employee information on various forms on mouse over on link button using ajax.

>I does not want to design panel on each form for showing employee information.
>is it possible by making a method as in windows application so that i can call it on each form.
if yes how it is possible?
Posted
Comments
uspatel 7-Aug-11 13:29pm    
Please any body suggest some ideas that make above task easy

1 solution

You may create a DIV dynamically & add your content to that & then you can show that in UI on mouseover.

Dynamically Create a DIV tag using Server-Side code or JavaScript[^]
DIV Popup for the OnmouseOver Event[^]

EDIT
-------------------------------
Consider you have received data in DataTable from database.
So Now your DataTable(dtEmployee) has 1 row based on given EmpCode
C#
if (dtEmployee.Rows.Count > 0)
{
 StringBuilder sb = new StringBuilder();
 sb.AppendLine("Employee Name : <b>" + dtEmployee.Rows[0]["EmployeeName"].ToString() + "</b>");
 sb.AppendLine("DOB : <b>" + dtEmployee.Rows[0]["DOB"].ToString() + "</b>");
 sb.AppendLine("Phone : <b>" + dtEmployee.Rows[0]["Phone"].ToString() + "</b>");
 Div1.InnerHtml = sb.ToString();//Finally assign the dynamic value to the dynamic DIV

}

Change the coding based on your requirement.
 
Share this answer
 
v2
Comments
uspatel 8-Aug-11 2:15am    
thank you very much for Your answer.
so my 5!
can You please tell me that how to add data fetched from database in this div.
thatraja 8-Aug-11 2:38am    
Check my updated answer.
BTW why don't you join GIT? Clickety Cheers.
uspatel 8-Aug-11 2:44am    
thanks

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900