protected void imgbtnDelete_Click(object sender, ImageClickEventArgs e) { string strcon = ConfigurationManager.ConnectionStrings["dbconnection"].ConnectionString; SqlConnection conn = new SqlConnection(strcon); GridViewRow selectedRow = ((Control)sender).Parent.NamingContainer as GridViewRow; gv.SelectedIndex = selectedRow.RowIndex; string id = selectedRow.Cells[1].Text; string qry = "update dbo.[user] set isDeleted='false' where userId='" + ID + "'"; SqlCommand cmd = new SqlCommand(qry, conn); conn.Open(); int r = cmd.ExecuteNonQuery(); if (r > 0) { Response.Redirect("editUser.aspx"); } conn.Close(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)