locked
How to show Price as text if Price is zero? RRS feed

  • Question

  • User1988740161 posted

    Hi.  A lot of ads on my site are entered with 0.00 for the price.  I'd like to find a way for ads entered with 0.00 for price to show a text message in place of the price field.  So if someone doesn't want to post a price on their ad, instead of Price: 0.00 the ad would show with Price: Call, or something like that.  I found a couple of references to App_Code/Web/OutputFormatting.vb as a possibility but I can't seem to figure it out.  Has anyone done something like this?  Thanks.

    Tuesday, April 14, 2009 3:56 AM

All replies

  • User730446648 posted

    Enter 0 in one of your test ads and view the database.

    I think it would enter 0.0000

    If it does try this.

    If ad.Price = "0.0000" Then

    PriceLabel.Text = "Call"

    Else

    PriceLabel.Text = ad.Price

    End If

    Should work.
    Good Luck

    Tuesday, April 14, 2009 11:20 PM
  • User1988740161 posted

    Thank you.  That worked perfectly.

    Thursday, April 16, 2009 1:28 PM