后台改变repeater html标签的style

来源:互联网 发布:vpn怎么修改域名 编辑:程序博客网 时间:2024/05/23 22:59
<td align="center" runat="server" style='<%# GetStyle((string)Eval("M_Mark")) %>'><%#DataBinder.Eval(Container.DataItem,"M_Mark"%></td>//后台方法
  protected string GetStyle(string type)        {            if (type == "已查看")                return "color:green";            else                return "color:red";        }
原创粉丝点击