I need to execute a stored procedure which is a simple delete (record) query. Programmaticaly, I want to pass in a parameter "ID1".
Assume I will pass in the ID1 parameter on a delete link click event froma GridView control. What would the code be to execute the existing stored procedure?
ID1 - the parameter and primary key of the source database for the record to be deleted
GridView1 - the GridView control
spDeleteRecord - the stored procedure needing the parameter ID1 and to be executed from C# code
Here's my start:
protected void GridView1_RowDeleting(object sender, EventArgs e)
TableCell cell = GridView1.Rows[e.RowIndex].Cells;
int ID1 = System.Convert.ToInt16(cell.Text);
??? - code here to call and execute parameter query