There are a bunch of places where I use a string value such as "6" or "10" where I want to display it as "000006" or "000010" (6 characters, 0 padded).
Within a GridView [asp.net 2.0] this is easy as I simply use the DataFormatString {0:000000}, but how can this be achieved for a normal string that I use to populate a DrillDown or Label witin a .cs file? How can I pad a string with "0"'s so that it is always X characters long?
Any help would be greatly appreciated...
Thanks,
Within a GridView [asp.net 2.0] this is easy as I simply use the DataFormatString {0:000000}, but how can this be achieved for a normal string that I use to populate a DrillDown or Label witin a .cs file? How can I pad a string with "0"'s so that it is always X characters long?
Any help would be greatly appreciated...
Thanks,