Solved

dropdownlist options...

Posted on 2009-07-01
2
229 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
ID: 24759982
Hi! Use DropDownList1.Items.Count
0
 
LVL 9

Assisted Solution

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

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

813 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

14 Experts available now in Live!

Get 1:1 Help Now