Looping to set labelname and label text
<p>I have a calendar that I'm working on setting up.  I have a loop that I have constructed but can't seem to get it to work.  Can someone help.</p>

<p>I have labels that are d1-d42.</p>

<pre class="lang-cs prettyprint-override"><code>public void schSetDates()
        {
            var Eom = scheduledatepicker.Value.AddMonths(1).AddDays(-1);
            Label d = new Label();
            if (scheduledatepicker.Value.DayOfWeek == DayOfWeek.Sunday)
            {
                for (int l = 1; l &lt;= Eom.Day; l++)
                {
                    for (int i = 1-1; i &lt;= Eom.Day; i++)
                    {
                        d.Name = ("d" + l.ToString("dd"));
                        d.Text = scheduledatepicker.Value.AddDays(i++).ToString("dd");
                    }
                }

            }

        }
</code></pre>