时能帮我看看这行为嘛报错啊。Gridview的一个问题,谢谢了
if (_myDs.Tables[_orderItemsName].Rows.Count == 1)
{
gvItems.FooterRow.Cells[2].Text = _myDs.Tables[_orderItemsName].Rows[0]["Price"].ToString();
Response.Write(gvItems.FooterRow.Cells[2].Text.ToString());
int temp = Convert.ToInt32(gvItems.FooterRow.Cells[2].Text.ToString());
Response.Write(temp);
}
else
{
int temp = Convert.ToInt32(gvItems.FooterRow.Cells[2].Text.ToString());
gvItems.FooterRow.Cells[2].Text = (temp + Convert.ToInt32((lblClothPrice.Text).ToString())).ToString();
//gvItems.FooterRow.Cells[2].Text = Convert.ToInt32(gvItems.FooterRow.Cells[2].Text.ToString()) + Convert.ToInt32(lblClothPrice.Text.ToString());
}
int temp=0
if (!string.IsNullOrWhiteSpace(gvItems.FooterRow.Cells[2].Text.ToString()))
{
temp = Convert.ToInt32(gvItems.FooterRow.Cells[2].Text.ToString());
}