为何我写的字符串截取方法总出现无效参数错误??
我写一个下载系统,要实现简介显示前30个字符
页面:
<%# jiequ((DataBinder.Eval(Container.DataItem,jiequ("show"))))%>
代码:
public string jiequ(string strs)
{
string substr;
if (strs.Length>30)
{
substr=strs.Substring(0,30)+"...";
return substr;
}
else
{
return strs;
}
}
但页面运行后总出现
编译器错误信息: CS1502: 与“ASP.index_aspx.jiequ(string)”最匹配的重载方法具有一些无效参数
请高手解答