private void GetTopics(string forumId) { com.CommandText = "select id,name,mess from topic where(subforum=" + forumId + ");"; OleDbDataReader dReader = com.ExecuteReader(); List<TopicItem> list = new List<TopicItem>(); while (dReader.Read()) { TopicItem ti = new TopicItem(); ti.id = dReader.GetInt32(0); ti.name = dReader.GetString(1); ti.mess = dReader.GetInt32(2); list.Add(ti); } for (int i = 0; i < list.Count; i++) { page.InnerHtml += "<tr class=\"fstr\">"; page.InnerHtml += TopicObjectParser(list[i].name, list[i].id, list[i].mess); page.InnerHtml += "</tr>"; } if (list.Count == 0) { page.InnerHtml += "<tr><td><div align=\"center\">В данном разделе пока нет тем</div></td></tr>"; } page.InnerHtml += "</table>\n"; }