为什么不将隐藏字段中的值转换为整数 [英] why not convert the value in hidden filed to integer

查看:71
本文介绍了为什么不将隐藏字段中的值转换为整数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

c_Service2.ID = Convert.ToInt16(hfId_Check_Box1_Checked.Value);



为什么不起作用?

c_Service2.ID = Convert.ToInt16(hfId_Check_Box1_Checked.Value);

why not work?

推荐答案

正如其他人所说,唯一不起作用的原因是因为隐藏字段的值不是Int16。



这对于你要调试并找出原因。
As others have said, the only reason it won't work is because the Value of the hidden field is not an Int16.

This is very easy for you to debug and figure out why.


这篇关于为什么不将隐藏字段中的值转换为整数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆