By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,838 Members | 1,675 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,838 IT Pros & Developers. It's quick & easy.

ListBox with multiple selection doesn't work

P: 21
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.
Mar 4 '08 #1
Share this Question
Share on Google+
1 Reply


P: 8
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(object sender, EventArgs e)
{

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

}
}
Mar 4 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.