Click here to Skip to main content
15,902,447 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Design screen as follows

Label (To show the message)

Faculty Name Dropdownlist

Month Dropdownlist

Year Dropdownlist

I have one button Show

When i click the Show button i want to validate if any of the above Faculty Name,Month and Year
is not selected.

i want to show the message in label.

For example if faculty name is not selected show the message Faculty Name is not selected.

for that how can i vaidate in using csharp.

narasiman P.
Thanks7872 30-Sep-13 8:27am    
Do you have access to

Simply check if the value in dropdown is not null.
if(ComboBox.SelectedItem == null)
    //do something about it
Share this answer
Try RequiredFieldValidator:[^]

All the best.

Share this answer
Refer below article

Introduction to ASP.NET validation[^]
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900