NUnit.Extensions.Asp.AspTester.AspControlTester.GenerateAnonymousId C# (CSharp) Method

GenerateAnonymousId() protected method

Creates an ID for a control that doesn't have one provided in the .aspx page. The tester using this method must algorithmically determine what number ASP.NET provided to the control. In other words, control number "3" turns into an ID of "ctl03" in ASP.NET 2.0 and "_ctl3" in ASP.NET 1.x.
protected GenerateAnonymousId ( int controlNumber ) : string
controlNumber int The number ASP.NET created for the control.
return string
        protected string GenerateAnonymousId(int controlNumber)
        {
            string id = controlNumber.ToString();
            return "ctl" + id.PadLeft(2, '0');
        }