private void grdProjectBind() { int userClientID = 0; Project ObjProject = new Project(); try { foreach (GridView row in grdClient.Rows) { userClientID = Convert.ToInt32(((Label)row.FindControl("lbUserClientID")).Text);//error here } // int userClientID = Convert.ToInt32(((Label) .FindControl("lbUserClientID")).Text); ObjProject.UserClientID = userClientID; DataSet ds = new DataSet(); ds = ObjProject.GetProjectList(); if (ds.Tables[0].Rows.Count != 0) { grdProject.DataSource = ds; grdProject.DataBind(); btnAddProject.Visible = false; } else { grdProject.DataBind(); btnAddProject.Visible = true; } } catch (Exception) { throw; } finally { ObjProject = null; } }
foreach (GridView row in grdClient.Rows)
foreach (GridViewRow row in grdClient.Rows)
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)