Hello again...
Try this:
int a = 1;
string s = a.ToString();
string s2 = s.PadLeft(8, '0');
The PadLeft() method aligns to the right the characters in your original
string and inserts in the left the specified character (in this case '0')
until the strings reaches the specified length (8).
This method is overloaded:
String.PadLeft(int totalWidth); // Inserts blank spaces
String.PadLeft(int totalWidth, char paddingChar); // Inserts the specified
char paddingChar
In the MSDN you can find the oposite, String.PadRight().
Bye...