asp dropdownlist - add numbers 1-15 to list

前端 未结 5 891
日久生厌
日久生厌 2021-01-14 13:00

Is there a way of adding the values 1-15 to an asp dropdownlist without having to do each one individually...

I currently have:

ddlAdults.Items.Inser         


        
5条回答
  •  自闭症患者
    2021-01-14 13:20

    Use a loop?

    Like for loop or a foreach loop.

    http://en.wikipedia.org/wiki/For_loop

    or http://en.wikipedia.org/wiki/Foreach

    That should help u, as I dont know what language u're programming in..

提交回复
热议问题