protected void ReadHtmlTable(string patientName, string startHour, string startMinute, int rowspan)
{
for(int i = 0; i <= tableAppointment.Rows.Count - 1; i++)
{
for(int j = 0; j <= tableAppointment.Rows[i].Cells.Count - 1; j++)
{
if(tableAppointment.Rows[i].Cells[j].InnerHtml.Trim() == startHour)
{
if(tableAppointment.Rows[i].Cells[j + 1].InnerHtml.Trim()== startMinute)
{
tableAppointment.Rows[i].Cells[j + 2].InnerText = patientName;
tableAppointment.Rows[i].Cells[j + 2].RowSpan = rowspan;
tableAppointment.Rows[i].Cells[j + 2].Style.Add("color", "green");
tableAppointment.Rows[i].Cells[j + 2].Style.Add("background", "green");
}
}
}
}
}
Above code is my server side code which executes on OnSaveStateComplete(EventArgs e) event . i am reading my html table in c#. when i check its first cell second cell text then its give result like this "\r\n\t\t\t\t\t\t\t\t\t08:00\r\n\t\t\t\t\t\t\t\t" .I have use trim at end but not work.