smhy8187

 

搜索关键字变红色

 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;
  
  }

posted on 2007-11-23 20:42  new2008  阅读(211)  评论(0编辑  收藏  举报

导航