473,387 Members | 1,534 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

validate if dropdownlist is empty

js
hi, how to validate if dropdownlist value is empty? many thanks.
Apr 23 '06 #1
2 4283
You can use:

if ddl.Items.Count = 0
' dropdownlist is empty
end if

Sonu Kapoor [MVP]
b: www.KapoorSolutions.com
w: www.DotNetSlackers.com
---
Posted via www.DotNetSlackers.com
Apr 23 '06 #2
js
Thansk, hwo to use client side validation?

<Sonu Kapoor [MVP]> wrote in message
news:Ox**************@TK2MSFTNGP02.phx.gbl...
You can use:

if ddl.Items.Count = 0
' dropdownlist is empty
end if

Sonu Kapoor [MVP]
b: www.KapoorSolutions.com
w: www.DotNetSlackers.com
---
Posted via www.DotNetSlackers.com

Apr 23 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: kamaumalone | last post by:
I have a dropdownlist which lives inside of a repeater. The repeater accepts user input via textboxes and the aforementioned dropdownlist. The repeater accepts phone numbers and allows for an...
2
by: Cortvriend Andy | last post by:
hi i'm filling an dropdownlist with data from sql server now i want to validate if a selection have been made the problem is that the validator never shows up i think he always says that...
0
by: Simon | last post by:
All I have a .Net 2003 webform, that contains a DropDownList databound to one table, whilst SelectedValue is databound to another table I discovered that the first time I'd load the page, the...
1
by: jimb | last post by:
I can get the dropdownlist into the datagrid, and I can populate it, but I can't read it. Anybody have a working example of a dropdownlist in an editable grid? Thanks. -- .....
2
by: bobby421 | last post by:
have to validate my web page using java script. I have one dropdown list also . I need a javascript to validate weather any item in dropdownlist is selected or not. e.g ddlDrop is my dropdownlist. ...
0
by: shapper | last post by:
Hello, I have 3 DropDownLists: ddlA, ddlB and ddlC. All these DropDownLists have a item which value is "". I need to create a validator that fires if any of the ddls are empty. I tried to...
1
by: Anilsg | last post by:
Hi all, I have the DropDownList in the FormView,inside InsertTemplateField The data is binded in run time to it in codebehind page,FOr the First time the page is loaded the DropdownList is...
0
by: Anilsg | last post by:
Hi all, I have the DropDownList in the FormView,inside InsertTemplateField The data is binded in run time to it in codebehind page,FOr the First time the page is loaded the DropdownList...
1
by: =?Utf-8?B?R3JlZw==?= | last post by:
I'm trying to set a asp:DropDownList control value to blank/null for records that have no value. But, I'm finding that even though their is no value in my source data, it displays a record from the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.