Bind to textbox with string.format

asp.net

Solution

You could use the following overload which allows you to specify the format:

<%# Bind("Price", "{0:#,###}") %>

Problem

Is there a way to make the binding work with string format? ``` <asp:TemplateField HeaderText="Price" > <EditItemTemplate> <asp:TextBox ID="txtPrice" runat="server" Text='<%# String.Foramt("{0:#,###}",Bind("Price")) %>' /> </EditItemTemplate> ```

Original source