Which is best approach to populate Drop Down list?
Hi I am de开发者_如何转开发veloping a asp.net web application. I am having 3 drop down(date, month and year) list for date of birth. Which approach is best to populate drop down list: Java script or code behind.
If you do it in the code behind, you have to pass more information to the page each time.
If you do it on the browser, you won't be able to automatically pull the values in the controls on post back.
Personally, I would do it in code behind. It's easier to work with on the server side, and the data transfer penalty is minimal in this instance.
精彩评论