Hey Harsha,
For simplicity i guess you have 2 tasks.
1. get max. salary for employee.
2. get any hikes in salary.
So, first create 1 temporary table for this task
SalHikes(Empid,Hike,Date)
Now use loop in code behind same as RK suggested.
Assuming there is only one record of any employee id
var maxSal;
maxSal=0;
for (int j = 3; j < dt.Columns.Count ; j++) {
if (maxSal < dt.Rows[i][j])
{
ExecuteSQL("INSERT INTO SalHikes(Empid,Hike,Date) SELECT '"+ EmpId +"','"+ Convert.ToDecimal(dt.Rows[i][j].ToString()) - maxSal +"','"+ dt.Columns[j].ColumnName +"'")
maxSal = Convert.ToDecimal(dt.Rows[i][j].ToString());
}
}
Now maxSal will be the max. salary of employee, and temp. table SalHikes will store the hikes of employee.
display max. salary for the employee and use sql query to fetch salary hikes of employee and display on aspx page, i assume there can be many salary hikes thats why i have used temp. table for storing hikes, if there is only one hike then you can directly use a variable to store thr hike and hike date.
Regards
Rakshit