Vi wrote:
Hi,
Is there a way to clear a DropDownList from code behind, something similar
to myDropDownList.length=0 on the client?
The DropDownList has an Items property with methods for adding and
removing ListItems. There's Clear(), which will remove *all* items
(DDLID.Items.Clear()), and there's also methods like Add(), Insert(),
Remove(), and RemoveAt().
hth
--
Scott Mitchell
mi******@4guysfromrolla.com http://www.4GuysFromRolla.com
* When you think ASP.NET, think 4GuysFromRolla.com!