private void BindTaskList(bool IncludeArchieved) { TaskListService objListService = new TaskListService(); DataTable DT; if (IncludeArchieved == true) { DT = objListService.GetAllTaskListWithUnarchieved(this.DBConnectionString); } else { DT = objListService.GetAllTaskList(this.DBConnectionString); } List <ToDoListClass> ToDoList = new List <ToDoListClass>(); for (int i = 0; i < DT.Rows.Count; i++) { DataRow dr = DT.Rows[i]; dr["Title"] = dr["Title"] + "(" + dr["count"] + ")"; } lstTaskListV.DataSource = DT; lstTaskListV.DataTextField = "Title"; lstTaskListV.DataValueField = "Id"; lstTaskListV.DataBind(); }