For Insert
ddlDiscipline.Items.Insert(0, new ListItem("--Select--", "--Select--"));
For Remove:-
ddlDiscipline.Items.Clear();
ddlDiscipline.Items.Insert(0, new ListItem("--Select--", "--Select--"));
reference:- https://meeraacademy.com/how-to-use-clear-remove-and-removeat-in-dropdownlist-in-asp-net/
No comments:
Post a Comment