代码如下:
public string getStyle(object style)
{
if ((int)style == 1)
{
return "文字";
}
return "图片";
}
在前台的Repeater中要这样调用,
代码如下:
<%#this.getStyle(Eval("link_style"))%>
查看更多关于asp.net Repeater绑定时使用函数的详细内容...
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://www.haodehen.cn/did36327