ListBox with multiple selection doesn't work

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • manivelk
    New Member
    • Jan 2008
    • 21

    ListBox with multiple selection doesn't work

    Hi there,

    I try to create a ListBox with multiple selection. The ListBox is filled with Data from a database once on Page_Load.

    When I click the button to submit the form all selections will be removed and only the first entry is selected.

    Has anybody a hint how to prevent from this?

    Thanks in advance.
  • gauthambr83
    New Member
    • Feb 2008
    • 8

    #2
    Originally posted by manivelk
    Hi there,

    I try to create a ListBox with multiple selection. The ListBox is filled with Data from a database once on Page_Load.

    When I click the button to submit the form all selections will be removed and only the first entry is selected.

    Has anybody a hint how to prevent from this?

    Thanks in advance.

    ----------------------------------------------------------
    Try this

    protected void Page_Load(objec t sender, EventArgs e)
    {

    if (!IsPostBack)
    {
    // Code for Binding Data to DropDownList goes Here

    }
    }

    Comment

    Working...