protected void Page_Load(object sender, EventArgs e) { var list = commentBal.Admin_GetAllComments(); CommentListView.DataSource = list; CommentListView.DataBind(); }
protected void Delete_Command(object sender, CommandEventArgs e) { int Id = int.Parse((string)e.CommandArgument); commentBal.Admin_DeleteComment(Id); var list = commentBal.Admin_GetAllComments(); CommentListView.DataSource = list; CommentListView.DataBind(); }