ASp.net中,如何实现关键字变色啊?
或者是datatable中的值关键字变色。
看到网上有这样:
private void DataGrid1_ItemDataBound(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e)
{
if(e.Item.ItemIndex>-1)
{
string tmp = “关键字”;
foreach(TableCell cell in e.Item.Cells)
cell.Text = cell.Text.Replace(tmp,"<font color=red>"+tmp+"</font>");
}
可是没法实现!郁闷啊!
相关推荐
gridview选中变色实现方法,.net
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e) { e.Row.Attributes.Add("onmouseover", "c=this.style.backgroundColor;this.style.backgroundColor='#37B4F5';this.style.cursor='pointer'"); e.Row.Attributes.Add("onmouseout","this.style.backgroundColor=c"); }
asp.net实现百度关键字搜索
asp.net实现百度关键字搜索
渐变色C#,ASP.NET
这是在ASP.NET项目中生成随机渐变颜色的技巧,该颜色将在每次回发后随机更改。
Asp.net GridView隔行变色和光棒效果2种方法实现
方法一:前台和后台配合使用 1.aspx 隔行变色属性(<AlternatingRowStyle BackColor=”#f5f5f5″>) 代码如下: <asp ID=”gvProjectList” runat=”server” xss=removed> <AlternatingRowStyle BackColor=”#f5f5f5″> </asp> 1.aspx.cs 后台事件中设置鼠标至于某行上的变色效果 代码如下: protected void gvProjectList_RowC
ASP.NET IIS变色龙工具
为同一Web项目的多个版本设置一个特定IIS虚拟目录的工具。



