Dropdown
Is there any difference between DropDownList.Items.Add and DropDownList.Items.Insert method?
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Sanjeeb LenkaRank #301 · 8.3K reputationPosted Aug 15, 2013, 8:05 AM EDT
DropDownList.Items.Insert method allows you to specify the index of the item within the DropDownList where you want to insert the ListItem.
Abhineet SrivastavaRank #1,890 · 783 reputationPosted Aug 15, 2013, 8:09 AM EDT
Well,In the case of DropDownList.Items.Insert where will item add by default?
Sanjeeb LenkaRank #301 · 8.3K reputationPosted Aug 15, 2013, 8:12 AM EDT
here you have mandatory to give the index where you want to add.
in this you can give the index position where you want to add the item.
here i am adding 'select' in index position 0
Abhineet SrivastavaRank #1,890 · 783 reputationPosted Aug 15, 2013, 8:20 AM EDT
Thanks Sanjeeb