将varchar值转换为数据类型int asp.net时转换失败

问题描述 投票:0回答:1

我从数据库表中的textBox获取值并在gridView中显示它,但是这个1字段给出了错误。

代码和例外:

enter image description here

asp.net
1个回答
0
投票

您正在尝试在int类型变量中获取字符串值。请改用字符串。或者在这里发布您的代码

© www.soinside.com 2019 - 2024. All rights reserved.