RadioButtonList1.SelectedValue = Trim(mydataset.Tables("information").Rows(0)("1_1"))
从mydataset.Tables("information").Rows(0)("1_1")这里取的是“非常好”这3个字。
但是出现”输入字符串的格式不正确。“这个提示我的RadioButtonList1有4个选相:
<asp:radiobuttonlist id="RadioButtonList1" runat="server" Width="277px" RepeatColumns="4" RepeatDirection="Horizontal">
<asp:ListItem Value="非常好" Selected="True">非常好</asp:ListItem>
<asp:ListItem Value="好">好</asp:ListItem>
<asp:ListItem Value="一般">一般</asp:ListItem>
<asp:ListItem Value="差">差</asp:ListItem>
</asp:radiobuttonlist>
堆栈跟踪:
[FormatException: 输入字符串的格式不正确。]
Microsoft.VisualBasic.CompilerServices.DoubleType.Parse(String Value, NumberFormatInfo NumberFormat) +195
Microsoft.VisualBasic.CompilerServices.IntegerType.FromString(String Value) +97[InvalidCastException: 从字符串“非常好”到类型“Integer”的强制转换无效。]
Microsoft.VisualBasic.CompilerServices.IntegerType.FromString(String Value) +212
Whealth.information.Page_Load(Object sender, EventArgs e) in F:\wwwroot\Whealth\user\information.aspx.vb:388
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +731
上面有个[InvalidCastException: 从字符串“非常好”到类型“Integer”的强制转换无效。]
请问为什么会出现这样的效果???
请高手指点。THX
从mydataset.Tables("information").Rows(0)("1_1")这里取的是“非常好”这3个字。
但是出现”输入字符串的格式不正确。“这个提示我的RadioButtonList1有4个选相:
<asp:radiobuttonlist id="RadioButtonList1" runat="server" Width="277px" RepeatColumns="4" RepeatDirection="Horizontal">
<asp:ListItem Value="非常好" Selected="True">非常好</asp:ListItem>
<asp:ListItem Value="好">好</asp:ListItem>
<asp:ListItem Value="一般">一般</asp:ListItem>
<asp:ListItem Value="差">差</asp:ListItem>
</asp:radiobuttonlist>
堆栈跟踪:
[FormatException: 输入字符串的格式不正确。]
Microsoft.VisualBasic.CompilerServices.DoubleType.Parse(String Value, NumberFormatInfo NumberFormat) +195
Microsoft.VisualBasic.CompilerServices.IntegerType.FromString(String Value) +97[InvalidCastException: 从字符串“非常好”到类型“Integer”的强制转换无效。]
Microsoft.VisualBasic.CompilerServices.IntegerType.FromString(String Value) +212
Whealth.information.Page_Load(Object sender, EventArgs e) in F:\wwwroot\Whealth\user\information.aspx.vb:388
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +731
上面有个[InvalidCastException: 从字符串“非常好”到类型“Integer”的强制转换无效。]
请问为什么会出现这样的效果???
请高手指点。THX
解决方案 »
- 职场新手搜集项目中一些常见的功能,希望各位高手慷慨些!跪谢!
- Razor 布局取代iFrame的问题
- ASP.NET图片显示问题
- 设计模式要怎么学习?我怎么就感觉很枯躁呢
- 请问asp.net两个小问题! 谢谢!
- 看看小弟的简历,哪里不合适请指教
- 请兄弟们推荐几个美工不错的网站、谢谢!!!
- Membership 密码设置问题 (高分问答)
- 读取web.config文件中的appSettings设置信息时出错.
- 什么原因我得win2000下安装完asp.net无法用,急!!!!!!!1
- 如何实现用Js调用数据库
- 高手请进!一个关于window server 2003 standard中asp.net 无法生成Excel的问题
自己看
InvalidCastException: 从字符串“非常好”到类型“Integer”的强制转换无效。]你把文字转数字怎么可能转的过去....SelectedItem.Text
这里的问题吧
但是他就是提示这句出错了。。RadioButtonList1.SelectedValue明明得到的是“非常好”这3个字但是为什么他要自己转INTEGER类型年》》