Posted on: 12/20/2013 5:42:53 AM | Views : 659

Hi friends,
I am using a checkbox  when  CheckBox is selected value="1" should be inserted in GridView if Not checked value="0"
protected void btnsubmit_Click(object sender, EventArgs e) { using (SqlConnection con = new SqlConnection(CS)) { SqlCommand cmd = new SqlCommand("insert into tblfacilitymaster(catid,facilityname,activestatus,filtertype)values('" +ddlcategory.Text+ "','" + txtname.Text + "','"+ dropstatus.Text + "','"+chksort.Text+"')", con); con.Open(); cmd.ExecuteNonQuery(); Response.Redirect(Request.Url.AbsoluteUri); } BindData(); }
chksort.Text is my checkbox value

THANKS IN ADVANCE

Go to the complete details ...