<%# strreplace((string)DataBinder.Eval(Container.DataItem, "title "),(string)Session[ "searchkey "], " <font color=red> "+(string)Session[ "searchkey "]+ " </font> ") %>
public string strreplace(string str,string str_1,string str_2)
{
string returnstr=str;
string s1,s2;
s1=str_1;
s2=str_2;
returnstr=returnstr.Replace(returnstr,s1,s2);
return returnstr;
}
//一运行出现了下面的错误
Replace 方法没有采用 3 个参数的重载
请各位朋友帮帮忙呀
------解决方案--------------------------------------------------------
returnstr.Replace(returnstr,s1,s2);
-->
returnstr.Replace(s1,s2);