为什么 gridView 页面没有插入或更新或刷新。我究竟做错了什么?
protected void DetailsView1_ItemInserting(object sender, DetailsViewInsertEventArgs e)
{
using (SqlConnection cn = new SqlConnection(Utilities.ConnectionString()))
using (SqlCommand cmd = new SqlCommand("uspUpdateDisplayHours", cn))
{
cn.Open();
cmd.CommandType = CommandType.StoredProcedure;
cmd.ExecuteNonQuery();
}
this.DetailsView1.DataBind();
}