有没有办法使绑定以字符串格式工作?
<asp:TemplateField HeaderText="Price" >
<EditItemTemplate>
<asp:TextBox ID="txtPrice" runat="server" Text='<%# String.Foramt("{0:#,###}",Bind("Price")) %>' />
</EditItemTemplate>
您可以使用以下重载来指定格式:
<%# Bind("Price", "{0:#,###}") %>
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)