protected void Bill_ItemCommand(object source, DataGridCommandEventArgs e) { // CheckBox ck = new CheckBox(); CheckBox ck = (CheckBox)e.Item.FindControl("chk"); string upval; if (ck.Checked) upval = "1"; else upval = "0"; if (e.CommandName == "Update") { OleDbConnection con = new OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + Server.MapPath("~/App_Data/") + "Bills_db.mdb;Persist Security Info=False"); // string strSql = @"Insert into January (Due_Date) values (txtDue_Date.txt)"; string strSql = "update tblBills set Remarks=" + upval + " where ID=" + (Bill.DataKeys[e.Item.ItemIndex]); con.Open(); OleDbCommand cmd = new OleDbCommand(strSql, con); // cmd.Parameters.AddWithValue("@Name", name); cmd.ExecuteNonQuery(); con.Close(); BindData(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)