页面导航: 首页网络编程ASP.NET高级应用 → 正文内容 Repeater绑定

asp.net Repeater绑定时使用函数

发布:dxy 字体:[增加 减小] 类型:转载
asp.net repeater绑定函数使用实例
在后台cs文件中有个函数:

public string getStyle(object style)
{
if ((int)style == 1)
{
return "文字";
}
return "图片";
}

在前台的Repeater中要这样调用,

<%#this.getStyle(Eval("link_style"))%>
Tags:asp.net Repeater
浏览次数:载入中... 打印本文关闭本文返回首页

文章评论

共有 位脚本之家网友发表了评论我来说两句

同 类 文 章
最 近 更 新
热 点 排 行