Here’s my code behind:
protected void gvviewapproval_RowUpdated(object sender, GridViewUpdatedEventArgs e)
{
using (SqlConnection cn = new SqlConnection(Utilities.ConnectionString()))
{
using (SqlCommand cmd = new SqlCommand("usp_SendEmails", cn))
{
cn.Open();
cmd.CommandType = CommandType.StoredProcedure;
cmd.ExecuteNonQuery();
}
}
gvviewapproval.DataBind();
}
}
You need to add a parameter named ‘@SchedId’ to the command object before executing the query.
i.e.