int temp2 = Convert.ToInt32 (gv.Rows[i].Cells[12+reccount].Text);
其中gv.Rows[i].Cells[12+reccount].text是数字,用convert或者parse 转换的时候,总是出错。
System.FormatException: Input string was not in a correct format.
...全文
12018打赏收藏
为啥类型转换总出错阿
int temp2 = Convert.ToInt32 (gv.Rows[i].Cells[12+reccount].Text); 其中gv.Rows[i].Cells[12+reccount].text是数字,用convert或者parse 转换的时候,总是出错。 System.FormatException: Input string was not in a correct format.
Response.Write(Convert.ToInt32 (gv.Rows[6].Cells[index ].Text.ToString().Trim())); 加上convert.toint32就报错System.FormatException: Input string was not in a correct format.