Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > remove an item from a dropdownList

Thread Tools

remove an item from a dropdownList

Patrick Beaudoin
Posts: n/a
Hello Adil,
this is my suggestion:

drdMedicine.Items.Add(New ListItem("All", "0"))
drdMedicine.Items.Remove(New ListItem("All", "0"))

drdMedicine.Items.Remove(New ListItem("All")

>-----Original Message-----
>Hi all,
>I'm using a dropdownlist to store some data. in the

page_load function i
>added an default item by this function
>drdMedicine.Items.Add(New ListItem("All", "0"))

drdMedicine.SelectedValue = 0
>but if the user clicks a button (named ibtNew), this

item should be removed,
>i tried this function but it's not working,
>can someone help me please,
>thanks in advance,

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
XHTML block item inside and inline item HTML 2 04-28-2005 03:42 PM
How to Remove item from DropDownList ? Kylin ASP .Net Web Controls 1 04-25-2005 05:28 AM
wishlist item: itertools.partition (WAS: Wishlist item: itertools.flatten) Steven Bethard Python 0 03-12-2005 07:50 PM
Display Related Item or Add Item ssoss ASP .Net 2 09-18-2003 11:35 PM
item[LENGTH] vs. *item and malloc() root C Programming 2 08-21-2003 07:07 PM