Solved

dropdownlist options...

Posted on 2009-07-01
2
227 Views
Last Modified: 2012-05-07
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
Comment
Question by:WebAppDeveloper
2 Comments
 
LVL 13

Accepted Solution

by:
drypz earned 250 total points
Comment Utility
Hi! Use DropDownList1.Items.Count
0
 
LVL 9

Assisted Solution

by:Rahul Goel
Rahul Goel earned 250 total points
Comment Utility
you can approach to the dropdownlist.Items.Count it will help you.
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Email Body 4 45
import issue in bit values 3 43
Bubble user-defined Sql RAISERROR(...) to c# exception 14 113
Long URL in SMS 6 21
Introduction Although it is an old technology, serial ports are still being used by many hardware manufacturers. If you develop applications in C#, Microsoft .NET framework has SerialPort class to communicate with the serial ports.  I needed to…
Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now