I have two listboxes on my .aspx page. These lists are populated on Page_Load as seen below:
if (!this.IsPostBack)
{
AllUsers.DataTextField = "name";
AllUsers.DataValueField = "id";
AllUsers.DataSource = src;
AllUsers.DataBind();
SelectedUser.DataTextField = "name";
SelectedUser.DataValueField = "id";
SelectedUser.DataSource = selected;
SelectedUser.DataBind();
}
I use javascript to move selected items between these two lists on the client side. I have a button which submits the form and calls a callback method on my .aspx.cs file.
I want to be able to access the items within my two Listboxes (AllUsers and SelectedUsers). When I try to access the items, the values returned are the same as the values which I first bound to these listboxes in page load.
Below are a few of the ways I have tried to access the items and what values are returned.
Go to the complete details ...