How to add a RequiredFieldValidator to DropDownList control?

前端 未结 4 830
青春惊慌失措
青春惊慌失措 2020-11-29 01:51

I have a DropDownList binded with aSqlDataSource to display the values from the database.

I am unable to validate using a RequiredFie

4条回答
  •  长情又很酷
    2020-11-29 02:13

    Suppose your drop down list is:

    
    
    ....
    
    

    There are two ways:

    
    

    the 2nd way is to use a compare validator:

    
    

提交回复
热议问题