protected void Butaddgang_Click(object sender, EventArgs e) { inserlaborgangs inlabgang = new inserlaborgangs(); for (int i = 0; i < GridView1.Rows.Count; i++) { if (GridView1.Rows[i].RowType == DataControlRowType.DataRow) { int labfilenoo = (int)GridView1.DataKeys[i].Value; CheckBoxList gang = (CheckBoxList)GridView1.Rows[i].FindControl("RadioButtongang"); TextBox remarks = (TextBox)GridView1.Rows[i].FindControl("Textremarks"); // add parameters inlabgang.labfileno = labfilenoo; inlabgang.Remarks = remarks.Text; if (gang.SelectedIndex > -1) { inlabgang.gangid = int.Parse(gang.SelectedValue.ToString()); inlabgang.formanid = 0; inlabgang.Add(); inlab.Update(); LblMsg.Text = "Done"; Page.DataBind(); } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)