How can I place zeroes to the left of a given number to a maximum of 6 digits including the given numbers.
I have this method that receives an ID number and downloads an HTML website according to that ID.

Typically, an IMDB link is like this:

    http://www.imdb.com/title/tt0892791/
    http://www.imdb.com/title/tt1226229/
    http://www.imdb.com/title/tt0000429/

They all follow the 'tt' then 7 digits, with lack of digits turning into zeroes to fill out the left spaces.

How can I accomplish this using C#? I'm kind of stumped.

Here's my method:

    /// <summary>
    /// Find a movie page using its precise IMDB id.
    /// </summary>
    /// <param name="id">IMDB Movie ID</param>
    /// <returns>Returns an HtmlDocument with the source code included.</returns>
    public HtmlDocument ByID(string id)
    {
        string url = String.Format("http://www.imdb.com/title/tt{0}/", id);            
        HtmlDocument page = downloader.Load(url);
        return page;
    }


Thank you very much for your time, and if you are interested in helping out, you can check out the complete source code of TheFreeIMDB here:
http://thefreeimdb.codeplex.com/
How can I place zeroes to the left of a given number to a maximum of 6 digits including the given numbers.
===

I have this method that receives an ID number and downloads an HTML website according to that ID.

Typically, an IMDB link is like this:

    http://www.imdb.com/title/tt0892791/
    http://www.imdb.com/title/tt1226229/
    http://www.imdb.com/title/tt0000429/

They all follow the 'tt' then 7 digits, with lack of digits turning into zeroes to fill out the left spaces.

How can I accomplish this using C#? I'm kind of stumped.

Here's my method:

    /// <summary>
    /// Find a movie page using its precise IMDB id.
    /// </summary>
    /// <param name="id">IMDB Movie ID</param>
    /// <returns>Returns an HtmlDocument with the source code included.</returns>
    public HtmlDocument ByID(string id)
    {
        string url = String.Format("http://www.imdb.com/title/tt{0}/", id);            
        HtmlDocument page = downloader.Load(url);
        return page;
    }


Thank you very much for your time, and if you are interested in helping out, you can check out the complete source code of TheFreeIMDB here:
http://thefreeimdb.codeplex.com/