Boolean Format String - Yes/No instead of True/False

Rate It (1)

Last post 08-20-2009 2:46 AM by Beginner1273. 32 replies.

Sort Posts:

  • Re: Boolean Format String - Yes/No instead of True/False

    12-17-2008, 7:29 PM
    • Member
      2 point Member
    • ASPet
    • Member since 12-18-2008, 12:21 AM
    • Posts 1

    Thank you arturo. This is a good example for me since while I can carry out the Boolean task I can also add normal events and include embedded If Then statements at the same time. Thanks again.

    How did you add that picture I tried but was not able to.

  • Re: Boolean Format String - Yes/No instead of True/False

    02-16-2009, 6:48 PM
    • Member
      620 point Member
    • FMastro
    • Member since 01-22-2004, 9:16 PM
    • Tampa, FL
    • Posts 158

    Motley:

    This should work as well:

    <%# CDbl(Eval("field")).ToString("No;Yes") %>

     

     Thanks, this was an awesome find.  Simple and easy.

    ...Mastro...
    FredMastro.Com
  • Re: Boolean Format String - Yes/No instead of True/False

    08-20-2009, 2:46 AM
    • Member
      2 point Member
    • Beginner1273
    • Member since 05-01-2007, 10:53 AM
    • Posts 1

    I know this is a little late...sorry...did this and it worked...its not pretty and it might not perform well ....

    Not sure what you would do if value was null though

     

    <%# ("No,Yes").Split(Convert.ToChar(","))[Convert.ToInt32(Eval("field"))] %>

     

      

    Hope it helps somebody

     

     

Page 3 of 3 (33 items) < Previous 1 2 3