搜索关键字变红色
public string replaceKeyWord(string pname)
{
string ToPlaceText=Request.QueryString["keyword"];
pname= Regex.Replace(pname,Regex.Escape(ToPlaceText),"<font color=red>$&</font>",RegexOptions.IgnoreCase);
return pname;
}
{
string ToPlaceText=Request.QueryString["keyword"];
pname= Regex.Replace(pname,Regex.Escape(ToPlaceText),"<font color=red>$&</font>",RegexOptions.IgnoreCase);
return pname;
}