protected void UpdateComment() { CommentDAO dao = Factory.Get(new CommentDAO()); List <CommentModel> list = (List <CommentModel>)dao.GetBy("where video_id='" + (Session["video"] as VideoModel).video_id + "'"); foreach (var item in list) { TableRow row = new TableRow(); TableCell cell = new TableCell(); Label name = new Label(); Label contenct = new Label(); UserDAO user_dao = Factory.Get(new UserDAO()); List <UserModel> user = (List <UserModel>)user_dao.GetBy("where id='" + item.user_id + "'"); name.Text = user[0].name + ":"; contenct.Text = "<br>" + item.contenct; cell.Height = 80; cell.Controls.Add(name); cell.Controls.Add(contenct); row.Cells.Add(cell); Table1.Rows.Add(row); } }