Jun
22
Written by:
Steve Gray
6/22/2009 4:12 PM
Owing to my clearly advancing age I have a hard time remembering how to format strings in all the different places that I work. VB has one way, Janus has another, Componentart is a third. So, I'll try and blog examples by category.
I'd really like help with this, if you'd send examples I'd appreciate it.
VB
'Format with one decimal place
String.Format("{0:n1}", 123.56)
'Formatting dates
String.Format("{0:MMddyyyy}", Now)
ASP.NET
The datagrid uses the standard VB format strings
<asp:BoundColumn DataField="availToSell"
DataFormatString="{0:F0}"></asp:BoundColumn>
Janus Grids
For number, use an InputMask of Number. ‘Number5’ will give 5 decimal places.
As always, I welcome your comments!