Is there a way to add values 1-15 to the asp dropdown without having to do each separately ...
I currently have:
ddlAdults.Items.Insert(0, new listitem("1", "1"))
ddlAdults.Items.Insert(1, new listitem("2", "2"))
ddlAdults.Items.Insert(2, new listitem("3", "3"))
ddlAdults.Ite......
... etc., but there must be a better way.
source
share