ItemDataBound Control

Discussion in 'ASP .Net Web Controls' started by Jeff Thur, Feb 17, 2005.

  1. Jeff Thur

    Jeff Thur Guest

    How can I program an itemdatabound control to get a column
    (Zipcode) to look as such xxxxx-xxxx. It currently is in
    this format, xxxxxxxxx.
    Thanks for any help.
    Jeff Thur, Feb 17, 2005
    #1
    1. Advertising

  2. Jeff Thur

    Riki Guest

    Jeff Thur wrote:
    > How can I program an itemdatabound control to get a column
    > (Zipcode) to look as such xxxxx-xxxx. It currently is in
    > this format, xxxxxxxxx.
    > Thanks for any help.


    In VB.NET:
    <%# Left(DataBinder.Eval(container.dataitem,"zip"),5) & " " &
    Right(DataBinder.Eval(container.dataitem,"zip"),4) %>

    --

    Riki
    Riki, Feb 18, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. James G. Beldock

    ItemDataBound not received by grid in table?

    James G. Beldock, Jul 24, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    430
    James G. Beldock
    Jul 24, 2003
  2. Steve Klett

    inserting control in ItemDataBound

    Steve Klett, Nov 12, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    609
    Steve Klett
    Nov 13, 2003
  3. Bryan
    Replies:
    1
    Views:
    3,554
    =?Utf-8?B?SEFSSSBQUkFTRCBCQVJV?=
    Oct 26, 2004
  4. Stimp
    Replies:
    0
    Views:
    354
    Stimp
    Jun 19, 2006
  5. Bryan
    Replies:
    2
    Views:
    292
    Bryan
    Oct 26, 2004
Loading...

Share This Page