i have gride view and i add delete action on it it want when the user press on delete return value in exact cell to save it in another table who can i do this ?
i have this code :
- using (SqlCommand _Cmd_Insert_NewLog = new SqlCommand("INSERT INTO tblLog (UserName,PCName,PCIP,LogDate,Note) VALUES(@UserName,@PCName,@PCIP,@LogDate,@Note)"))
- {
-
- string _StrUserName = "";
- _StrUserName = Session["EmployeeUserName"].ToString();
-
-
-
- string _StrHostName = ""; _StrHostName = Dns.GetHostName();
-
-
-
- string _StrHostIP = "";
-
- _StrHostIP = HttpContext.Current.Request.UserHostAddress.ToString();
- string _Str_Note = "The User : " + _StrUserName + " | Delete The Item With Barcode : " + LblBarcode.Text.Trim().ToString() + " | In Date : " + _DateAdd;
- _Cmd_Insert_NewLog.CommandType = CommandType.Text;
- _Cmd_Insert_NewLog.Parameters.AddWithValue("@UserName", _StrUserName);
- _Cmd_Insert_NewLog.Parameters.AddWithValue("@PCName", _StrHostName);
- _Cmd_Insert_NewLog.Parameters.AddWithValue("@PCIP", _StrHostIP);
- _Cmd_Insert_NewLog.Parameters.AddWithValue("@LogDate", DateTime.Parse(_DateAdd));
- _Cmd_Insert_NewLog.Parameters.AddWithValue("@Note", _Str_Note);
- _Cmd_Insert_NewLog.Connection = _Conn;
-
-
- _Cmd_Insert_NewLog.ExecuteNonQuery();
- _Conn.Close();
-
- }
LblBarcode.Text.Trim() its label i want to read the barcode from it the barcode in the grideview in cell 4