Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Jul 2001
    Location
    Minneapolis, Minnesota, USA
    Posts
    299
    Thanks
    0
    Thanked 0 Times in 0 Posts

    asp.net - percent sign

    I set up a field as this:

    Text='<%# String.Format("{0}", DataBinder.Eval(Container, "DataItem.MMM_PCT")) %>'>

    Unfortunately, the percent sign shows up on the left (e.g. % 1.0), and the users are used to seeing the percent sign at the end (e.g. 1.0%). Is there any way to make this possible?
    Carpy Diem, it&#39;s .

  2. #2
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: asp.net - percent sign

    Peggy

    Shot in the dark here.... you have the correct syntax for a prcentage but have you tried:

    Text='<%# String.Format("{0:#%}", DataBinder.Eval(Container, "DataItem.MMM_PCT")) >'
    Jerry

  3. #3
    3 Star Lounger
    Join Date
    Jul 2001
    Location
    Minneapolis, Minnesota, USA
    Posts
    299
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: asp.net - percent sign

    Jerry,

    It works on the display but I need to tweak it so it will work on the update. Oh, and I forgot to mention that the users also like 3.00% or 3.50%. I'm sure I can figure this out too.

    Thanks! <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>
    Carpy Diem, it&#39;s .

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •