Format ASP LABEL

Last post 08-02-2003 10:26 PM by SushilaSB. 3 replies.

Sort Posts:

  • Format ASP LABEL

    08-02-2003, 2:59 PM
    • Participant
      990 point Participant
    • jackiea
    • Member since 08-01-2003, 2:15 PM
    • Beaumont, Texas
    • Posts 198
    Does anyone know how to format the results of an asp:label in VB.NET for money? The text is being returned from an access database.

    I get 1.4 instead of $1.40.

    This is my code.

    <asp:label ID="reg_price" Font-Name="Arial" Font-Size="9px" Font-Bold="false" ForeColor="#FF3333" runat="server" Text='<%# Container.DataItem("RegPrice") %>'></asp:label>
  • Re: Format ASP LABEL

    08-02-2003, 3:58 PM
    • Star
      11,397 point Star
    • SushilaSB
    • Member since 06-18-2002, 1:05 AM
    • Posts 2,265
    <asp:label ID="reg_price" Font-Name="Arial" Font-Size="9px" Font-Bold="false" ForeColor="#FF3333" runat="server" Text='<%#DataBinder.Eval( Container.DataItem,"RegPrice","{0:c}") %>'></asp:label>
    Sushila Bowalekar Patel
    Visual ASP/ASP.NET MVP
    http://weblogs.asp.net/sushilasb
  • Re: Format ASP LABEL

    08-02-2003, 4:12 PM
    • Participant
      990 point Participant
    • jackiea
    • Member since 08-01-2003, 2:15 PM
    • Beaumont, Texas
    • Posts 198
    Thanks for the help.
    Works like a charm now.

    Is there any sites, or do you know anywhere, that I can look for more info on formating asp:labels and other web controls.

    Thanks Again!
  • Re: Format ASP LABEL

    08-02-2003, 10:26 PM
    • Star
      11,397 point Star
    • SushilaSB
    • Member since 06-18-2002, 1:05 AM
    • Posts 2,265
    Sushila Bowalekar Patel
    Visual ASP/ASP.NET MVP
    http://weblogs.asp.net/sushilasb
Page 1 of 1 (4 items)