0

代码:

 <uc1:UploadImageControl ID="UploadImageControl1" runat="server" SaveButtonID="btnUpdate"
                                     ImageDirectory="centers" ImageFileName='center_<#Eval("CENTER_ID")%>' DeleteImageAfterSave="true"
                                      MaxUploadSize="5000000" />

结果center_<#Eval("CENTER_ID")%>总是center_<#Eval("CENTER_ID")%>我的问题是为什么评估不给我正确的中心ID31

4

2 回答 2

0

# 之前的 % 缺失:

ImageFileName='center_<%#Eval("CENTER_ID")%>'

于 2013-10-12T11:54:05.430 回答
0

您在 # 之前缺少 %,试试这个

ImageFileName='center_<%#Eval("CENTER_ID")%>'

代替

ImageFileName='center_<#Eval("CENTER_ID")%>'
于 2013-10-12T11:55:30.953 回答