binding a dropdown list C# .NET

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kennywu
    New Member
    • Oct 2008
    • 2

    binding a dropdown list C# .NET

    I am using a databound dropdown list bound to a sql datasource in C# .NET environment. When the user opts to delete an entry from the dropdown list, the dropdown list does not reflect the change, even on postback.
    i.e. ddlColors = red, yellow, blue, green; user selects to delete red; ddlColors = red, yellow, blue, green. Red is still displayed.
    I am able to clear the dropdown list with ddlColors.Clear Selection(); But I don't know how to repopulate the dropdown list to display the updated datasource.
  • nateraaaa
    Recognized Expert Contributor
    • May 2007
    • 664

    #2
    After you remove the item from the drop down list are you calling dropdownlist.Da taBind()?

    Nathan

    Comment

    • kennywu
      New Member
      • Oct 2008
      • 2

      #3
      NM, i just manually added the new element. thks tho.

      Comment

      Working...