Like that how to get dropdownlist validation

Like that how to get dropdownlist validation

Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Naimish MakwanaRank #324 · 7.7K reputationPosted Mar 10, 2023, 1:11 AM EST
Hello Tarun,
Have an option with value 0 which is going to be the default option of the dropdown and add required attribute to the select element. Once this select element is in a form and is submitted ,HTML is automatically going to take over the validation part.
Refer below link:
https://stackoverflow.com/a/53514468/3054222
Thanks
Naimish Makwana
TarunRank #6,374 · 268 reputationPosted Mar 10, 2023, 1:18 AM EST
i want asp.net
Naimish MakwanaRank #324 · 7.7K reputationPosted Mar 10, 2023, 1:25 AM EST
try below:
TarunRank #6,374 · 268 reputationPosted Mar 10, 2023, 2:05 AM EST
like that checkbox and RadioButton aslo tell me
Naimish MakwanaRank #324 · 7.7K reputationPosted Mar 10, 2023, 2:14 AM EST
For others you can use required attribute.
Thanks