protected void btnSave_Click(object sender, EventArgs e) { foreach (GridViewRow gr in gvAssignScreen.Rows) { CheckBox chkAssingScreen = (CheckBox)gr.FindControl("chkAssingScreen"); string lblScreen_ID = ((Label)gr.FindControl("lblScreen_ID")).Text; string lblNavModule_ID = ((Label)gr.FindControl("lblNavModule_ID")).Text; if ((chkAssingScreen.Checked == true || lblNavModule_ID != "0") && chkAssingScreen.Enabled == true) { int retval = BLL_Infra_ShipSettings.Ins_Upd_Assign_Child_Screen(Convert.ToInt32(Request.QueryString["Nav_Module_ID"].ToString()), chkAssingScreen.Checked == true ? 1:0 , Convert.ToInt32(lblScreen_ID), Convert.ToInt32(Session["userid"].ToString())); } } }