Dropdown list box validations

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Rohit111111
    New Member
    • Mar 2007
    • 48

    #1

    Dropdown list box validations

    Hello all,
    I am new to this forum ans also i am new to asp.net,
    I have a problem in validating a dropdown list for a blank value

    please help
  • vijaydiwakar
    Contributor
    • Feb 2007
    • 579

    #2
    Originally posted by Rohit111111
    Hello all,
    I am new to this forum ans also i am new to asp.net,
    I have a problem in validating a dropdown list for a blank value

    please help
    've u tried to use validation ctrl

    Comment

    • Rohit111111
      New Member
      • Mar 2007
      • 48

      #3
      Originally posted by vijaydiwakar
      've u tried to use validation ctrl
      Yes i have tried the required field validator as well as range validators but both are not working in my month ,day and year dropdown list

      Comment

      • kenobewan
        Recognized Expert Specialist
        • Dec 2006
        • 4871

        #4
        How did you end up with a dropdownlist without a value? You could check with a script with whatever event you are using. If empty cancel out of the function and display a message.

        Comment

        • subbulakshmi
          New Member
          • May 2007
          • 3

          #5
          hi,

          set first value of dropdownlist.va lue=""
          dropdownlist.te xt="Select"

          and then use required field validator for this control

          now required field validator check DDL.value. so if its "" then reurn error message

          ok va

          bye





          Originally posted by Rohit111111
          Hello all,
          I am new to this forum ans also i am new to asp.net,
          I have a problem in validating a dropdown list for a blank value

          please help

          Comment

          Working...