Skip to content

How to display the dates in the selected month

sathya kumar

Asked Feb 2, 2011, 9:42 PM EST2 answers
Share
LinkedInX
Hi friends,

I want to display the dates in the selected month.

I have two dropdownlists in my page

In the first dorpdownlist i stored
<asp:ListItem>January</asp:ListItem>
<asp:ListItem>February</asp:ListItem>
..............
<asp:ListItem>December

In the Second dropdownlist i stored
<asp:ListItem>2009</asp:ListItem>
<asp:ListItem>2010</asp:ListItem>

Now i when i click the month and year i want to display the dates in the selected month of the corresponding year.

Is there any option to display the dates like this. If anybody know please tell me.

thanks,

2 Answers

Know the answer? Post it. Somebody with the same question will find it here.

  • Suthish Nair
    0
    Code
    1. Convert.ToDateTime(DateTime.Now).ToString("dd")
    Code
    2. DateTime.Today.Day

    will give todays date.
    VB.NET
    eg: Convert.ToDateTime(DateTime.Now).ToString("dd") + "-" + drop1.SelectedItem.text + "-" + drop2.SelectedItem.text

    or looking for something else.
    0
  • Suthish Nair
    0
    If this query got resolved then please Accept the post that helped you as Answer.
    So other members can easily find the answers.
    0