DropDownList validation

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Deepthi charliena
    New Member
    • Aug 2008
    • 1

    DropDownList validation

    Hi
    can anyone please help me.
    i have two dropdownlists.o ne is for month and the other is for days.if i select any other month from the month dropdownlist the days in the second(days) dropdown should have upto 30(1,2,3......) .if february is selected the the days should be only upto 28. how to do this
  • r035198x
    MVP
    • Sep 2006
    • 13225

    #2
    Which language are you using for that? You can do it in Javascript or in ASP.NET with (C# or VB). But even better is to just one of the thousands of ready made date pickers that are all over the internet.

    Comment

    • tlhintoq
      Recognized Expert Specialist
      • Mar 2008
      • 3532

      #3
      On the event of ListBoxMonth.Se lectedIndexChan ged go to a function that checks which month is selected, then populate the ListBoxDays.Ite ms property with the right number of days.

      Exactly how you do the populating is up to your programming style. Maybe you have a List with the number of days in each month {31,28,31...} then loop from 1-x adding the loop's index to the Day dropdown list. Maybe you do use a Switch construct (case "January".. . case "February". ..)

      Comment

      • madhuani
        New Member
        • Aug 2008
        • 1

        #4
        hibnnm;;;;;;;;; ;;;;;;;;;;;;;;; ;;;;;;;;;;;;;

        Comment

        • r035198x
          MVP
          • Sep 2006
          • 13225

          #5
          Originally posted by madhuani
          hibnnm;;;;;;;;; ;;;;;;;;;;;;;;; ;;;;;;;;;;;;;
          In case you are feeling the urge to introduce yourself you should use the introduction forum for that.

          Comment

          Working...