I have a drop down list in ASP.NET.
I want to remove every item from this list apart from the first one.
I see there is a Remove methond on items but it dosn’t seeem to meet my needs.
Can this be done?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
you could grab the first element and store it in a local variable, then remove all items (Clear method) and finally add the first element again.