asp.net Repeater綁定時使用函數(shù)
來源:懂視網(wǎng)
責(zé)編:小采
時間:2020-11-27 22:45:03
asp.net Repeater綁定時使用函數(shù)
asp.net Repeater綁定時使用函數(shù):在后臺cs文件中有個函數(shù): 代碼如下:public string getStyle(object style) { if ((int)style == 1) { return 文字; } return 圖片; } 在前臺的Repeater中要這樣調(diào)用, 代碼如下:<%#this.getStyle(Eval(link_
導(dǎo)讀asp.net Repeater綁定時使用函數(shù):在后臺cs文件中有個函數(shù): 代碼如下:public string getStyle(object style) { if ((int)style == 1) { return 文字; } return 圖片; } 在前臺的Repeater中要這樣調(diào)用, 代碼如下:<%#this.getStyle(Eval(link_
在后臺cs文件中有個函數(shù):
代碼如下:
public string getStyle(object style)
{
if ((int)style == 1)
{
return "文字";
}
return "圖片";
}
在前臺的Repeater中要這樣調(diào)用,
代碼如下:
<%#this.getStyle(Eval("link_style"))%>
聲明:本網(wǎng)頁內(nèi)容旨在傳播知識,若有侵權(quán)等問題請及時與本網(wǎng)聯(lián)系,我們將在第一時間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com
asp.net Repeater綁定時使用函數(shù)
asp.net Repeater綁定時使用函數(shù):在后臺cs文件中有個函數(shù): 代碼如下:public string getStyle(object style) { if ((int)style == 1) { return 文字; } return 圖片; } 在前臺的Repeater中要這樣調(diào)用, 代碼如下:<%#this.getStyle(Eval(link_