Login or Sign Up to become a member!

EXPERTS, INFORMATION, IDEAS & KNOWLEDGE

Social bookmarker Add this

ASP.NET: Insert a ListItem into a DropDownList

From Wiki

Jump to: navigation, search

Summary: Add a default item to a DropDownList so it is the first item in the list.

  1. MyDropDownList.Items.Insert(0,"Select From List...")

NOTE: This should be called after the DataBind method of the DropDownList has been called.


This Hack is part of the ASP.NET Hacks collection

442 Rating: 0.0/5 (0 votes cast)