日期:2014-05-17  浏览次数:20818 次

asp,net前台获取后台值的一个简单问题
在后台table中的td设置属性rowspan= '<%=GetLinCount()%>';
GetLinCount();该函数返回值的类型是字符串类型。运行很正常没什么毛病。
但是当我给table增加runat="server"属性时,rowspan= '<%=GetLinCount()%>';
出现如下错误:Cannot create an object of type 'System.Int32' from its string representation '<%=GetLinCount()%>' for the 'RowSpan' property.
于是在后台我将GetLinCount();函数的返回值设置为Int32类型,依然出现这个错误。在table增加runat="server"属性时,我怎样使前台rowspan属性获取该值啊?谢谢

------解决方案--------------------
runat server 的table 跟html的table是不一样的
------解决方案--------------------
http://blog.sina.com.cn/s/blog_69e8baad0100m458.html