Solved

dropdownlist options...

Posted on 2009-07-01
2
230 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
List<PaisEntity> - show some 1 38
need to convert function to c# 5 45
c# DateTime Format validation 4 68
Visual C# Windows Project - Clone Form 4 22
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

749 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