Saturday, July 25, 2009
Formating
18.333333 ---> 18.33
String.Format("{0:#0.00}", 18.333333); //Please note that above 18.3333 is not a string value
s = String.Format("{0:c}", price) //price is a double
Percentage
lblX.Text = String.Format("{0:0%}", ABC); //ABC is a double
Inline ASPX page
lblX.Text='<%# Bind("sDate","{0:d}") %>'
lblY.Text='<%# Bind("XOAmount","{0:c}") %>'
String.Format("{0:#0.00}", 18.333333); //Please note that above 18.3333 is not a string value
s = String.Format("{0:c}", price) //price is a double
Percentage
lblX.Text = String.Format("{0:0%}", ABC); //ABC is a double
Inline ASPX page
lblX.Text='<%# Bind("sDate","{0:d}") %>'
lblY.Text='<%# Bind("XOAmount","{0:c}") %>'
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment