Saturday, 3 August 2013

Month List (DateTimeFormatInfo)

    private void DD_Monthbind()
    {
        DateTimeFormatInfo info = DateTimeFormatInfo.GetInstance(null);
        for (int i = 1; i < 13; i++)
        {
            DropDownList1.Items.Add(new ListItem(info.GetMonthName(i), i.ToString()));

        }
    }

No comments:

Post a Comment