GridView模板列 中使用 DataBinder.Eval()问题
这是我的一个后台函数
public void EnCodeQuery( string str )
{
if (str.Length > 0)
{
string encodeJobId = UrlQuery.StringEncode(str);
Response.Write(encodeJobId);
}
}
这是我页面绑定的数据
<%# EnCodeQuery( DataBinder.Eval(Container.DataItem,"DM_MANAGEMENT_ID").ToString()) %>
报错:
1.错误 9 与“System.Convert.ToString(object, System.IFormatProvider)”最匹配的重载方法具有一些无效参数 E:\Workspace\Pyllot.EC.Cargo\Web\Document\Search.aspx 152
2.错误 10 参数“1”: 无法从“void”转换为“object” E:\Workspace\Pyllot.EC.Cargo\Web\Document\Search.aspx 152