For Programmers: Free Programming Magazines  


Home > Archive > ASP .NET Webcontrols > February 2005 > ItemDataBound Control









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author ItemDataBound Control
Jeff Thur

2005-02-17, 8:59 pm

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.
Riki

2005-02-18, 4:00 pm

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


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com