How to check if dropdownliast contains 0 or is empty in asp.net using C #?

I have a dropdown that has several values ​​that I get from my stored procedure. But there may be times when my drop-down menu is left blank. so in this case I want the user to manually enter a value. Is it possible? If so, how? thanks.

+6
source share
1 answer

Use

if (ddl.Items.Count == 0) { txt.Enabled = true; } 
+10
source

Source: https://habr.com/ru/post/956483/


All Articles