zl程序教程

您现在的位置是:首页 >  移动开发

当前栏目

asp.netRepeater绑定时使用函数

ASP 使用 函数 绑定 NETrepeater
2023-06-13 09:14:01 时间
在后台cs文件中有个函数:
复制代码代码如下:

publicstringgetStyle(objectstyle)
{
if((int)style==1)
{
return"文字";
}
return"图片";
}

在前台的Repeater中要这样调用,
复制代码代码如下:

<%#this.getStyle(Eval("link_style"))%>