Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 234
  • Last Modified:

dropdownlist options...

Hi,

Is there a way to programmatically find out how many options (items) exist (have been populated) in a dropdownlist control during Page_Load (in ASP.NET using C#)? I can do this in JavaScript, but I need to do it in ASP.NET.  The dropdownlist control does not support the "length" property.

Many thanks.
0
WebAppDeveloper
Asked:
WebAppDeveloper
2 Solutions
 
drypzCommented:
Hi! Use DropDownList1.Items.Count
0
 
Rahul Goel ITILSenior Consultant - DeloitteCommented:
you can approach to the dropdownlist.Items.Count it will help you.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now