protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e) { string strMessage = string.Empty; string strScript = string.Empty; HiddenField hdditem_acc_detail_id = (HiddenField)GridView1.Rows[e.RowIndex].FindControl("hdditem_acc_detail_id"); cItem_acc oItem_acc = new cItem_acc(); try { if (!oItem_acc.SP_ITEM_ACC_DETAIL_DEL(hdditem_acc_detail_id.Value.ToString(), ref strMessage)) { lblError.Text = strMessage; } } catch (Exception ex) { lblError.Text = ex.Message.ToString(); } finally { oItem_acc.Dispose(); } BindGridView(); }