简体   繁体   中英

Can I concatenate “<%# %>” used for databinding in ASP.NET Controls

I have a table within repeater. Can I add prefix for this

 <tr id="<%#DataBinder.Eval(Container.DataItem,"DocumentId")%>">

to something like

 <tr id="rowId" + "<%#DataBinder.Eval(Container.DataItem,"DocumentId")%>">

而是使用格式化程序。

<tr id='<%# Eval("eDocumentId", "rowId{0}")%>'>

尝试这个

<tr id='<%# "rowId" + DataBinder.Eval(Container.DataItem,"eDocumentId")%>'>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM