数据绑定的字段长度怎么取?高手请进,在线等待,立即给分 当“Introduce”小于38时,就取不出,如何判断Introduce的长度 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <%# GetValue(DataBinder.Eval(Container.DataItem,"Introduce")) %>代码:public GetValue(string sValue){ return sValue.Length>38?sValue.Substring(0,38):sValue;} Sorry,函数声明应该是:public string GetValue(string sValue) 比一定非要先判断长度的比如这样<%# (((string)DataBinder.Eval(Container.DataItem,"Introduce"))+" ").Substring(0,38)%> 再帮我看看这个问题,现在给你50分http://www.csdn.net/expert/topic/726/726889.xml?temp=.1596949 网页中如何调用Fortran程序 DataTable删除行的问题 关于发布网站的问题 MasterPage中自定义控件与服务器交互时数据扔失 请问登陆后返回原链接的问题 [高分求代码] 哪位大哥有智能客户端的代码,请给过来,分不够再加! 初学者的问题,不笑! 下面的语句提示缺少 { 怎么在ASP与ASP.NET之间参数传递. 请问从哪可以找到学习ASP.NET的资料呢? 乱码啊!!! DataGrid列替换显示的问题
代码:
public GetValue(string sValue)
{
return sValue.Length>38?sValue.Substring(0,38):sValue;
}
public string GetValue(string sValue)
比如这样
<%# (((string)DataBinder.Eval(Container.DataItem,"Introduce"))+" ").Substring(0,38)%>
http://www.csdn.net/expert/topic/726/726889.xml?temp=.1596949