【发布时间】:2018-04-04 20:44:39
【问题描述】:
如何将文本添加到带有绑定数据的标签?
Text='<%# Bind("DeliveryPrice") %>'
尝试显示 £ 1.23。尝试了许多发布到论坛的示例,但没有成功:
Text='<%# "£: " +Eval("DeliveryPrice").ToString() %>'
Text='<%# String.Format("£: {0}", Bind("DeliveryPrice")) %>'
Text="£" + '<%# Bind("DeliveryPrice") %>'
Text="£" & '<%# Bind("DeliveryPrice") %>'
Text='£ <%# DataBinder.Bind(Container.DataItem,"DeliveryPrice") %>'
Text='<%# "£" & Bind("DeliveryPrice") %>'
Text='<%# "£" + Bind("DeliveryPrice") %>'
【问题讨论】:
标签: c# asp.net data-binding