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.
WebAppDeveloperAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
drypzConnect With a Mentor Commented:
Hi! Use DropDownList1.Items.Count
0
 
Rahul Goel ITILConnect With a Mentor Senior Consultant - DeloitteCommented:
you can approach to the dropdownlist.Items.Count it will help you.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.