GridView1.DataKeys DataKeys 属性绑定主键
int BookID = int.Parse(GridView1.DataKeys[e.RowIndex]["BookID"].ToString());
Label BookNumber = (Label)GridView1.Rows[e.RowIndex].FindControl("Label2");
string Content = e.NewValues["Content"].ToString();
int Pricec =int.Parse( e.NewValues["Pricec"].ToString());
protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
{
if (e.CommandName=="upup")
{
Label sname = (Label)((Control)e.CommandSource).FindControl("Lable");
}
}