strHTML = "<table id='table1'> <colgroup><col width='190'/></colgroup><tbody>"; for (int i = 0; i < objDs.Tables[0].Rows.Count; i++) { if (i <= 10) { strUniqueID = "a" + i; strBGColor = "a" + i.ToString(); } else { strUniqueID = "a" + i; strBGColor = "a" + (i - 1); } strSubject = objDs.Tables[0].Rows[i]["SubjectName"].ToString(); iSubjectID = Convert.ToInt32(objDs.Tables[0].Rows[i]["Subjectid"]); strHTML = strHTML + "<tr><td class='dark'><div id='" + strUniqueID + "' class='drag clone " + strBGColor + "'>" + strSubject + "</div><input id='b_" + strUniqueID + "' class='" + strUniqueID + "' type='button' value='' onclick='report(" + strUniqueID + ")' title='Show only " + strSubject + "'/></td></tr>"; } strHTML = strHTML + "<tr><td class='trash' title='Trash'>Trash</td></tr>"; strHTML = strHTML + "</tbody></table>"; left.InnerHtml = strHTML;