Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > ItemDataBound Control

Reply
Thread Tools

ItemDataBound Control

 
 
Jeff Thur
Guest
Posts: n/a
 
      02-17-2005
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.
 
Reply With Quote
 
 
 
 
Riki
Guest
Posts: n/a
 
      02-18-2005
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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
control not being found on ItemDataBound Stimp ASP .Net 0 06-19-2006 05:08 PM
Add formatted text to JavaScript function call during ItemDataBound of a Repeater Control. Bryan ASP .Net Datagrid Control 2 10-26-2004 04:02 PM
Add formatted text to JavaScript function call during ItemDataBound of a Repeater Control. Bryan ASP .Net 1 10-26-2004 05:03 AM
inserting control in ItemDataBound Steve Klett ASP .Net 2 11-13-2003 05:39 PM
ItemDataBound not received by grid in table? James G. Beldock ASP .Net 0 07-24-2003 04:38 PM



Advertisments