protected void ordersGV_SelectedIndexChanged(object sender, EventArgs e)
{
orderdetails_lbl.Visible = true;
int orderId=int.Parse(ordersGV.SelectedRow.Cells[1].Text);
var query = nw.Order_Details.Where(od => od.OrderID == orderId).Select(od=>new {od.Product.ProductName,od.Quantity });
orderdetailsGV.DataSource = query.ToList();
orderdetailsGV.DataBind();
}
在此代码之后我有这个例外:
输入字符串的格式不正确。