jquery - Move data between listboxes when one gets values from table -


I have a webpage with 2 lists and I should be able to move data forward and forward between them. As long as I did not need a listboxes (column list) to get data from Access DB, I was fully working it

values ​​are populated on the server side, so I JQuery code was now used to always count the selected items as 0. I think code will now need to move these items to server side vb. I was able to do this successfully, but after that he was making a postback of the form, which I could not do.

I try to use javascript to perform a webmethod call to perform the steps, but unless that I have the "Public Shared Function" declaration, which then will not be able to listboxes The cause of a problem can be seen by the code that will not be used by the code (can not refer to an example member of a class from within a shared method ...).

Anyway, here's the button control to move the item to the rightbox:

   

The button here is declared on the server side:

  Safe WithEvents MoveRight System.Web.UI.HtmlControls.HtmlButton  

Here is my code-behind, server-side code:

  Move the Private Sub MoveRight () MoveRight.ServerClick Dim LeftSideCount Integer = 0 Dim RightSideCount Integer = 0 Dim SelectedItemsArray As in the form of (111) ListItem X as integer = 0 to ColumnsList.Items.Count - 1 then ColumnsList.Items.Item (x) .Selected LeftSideCount + = 1 SelectedItemsArray (x) = ColumnsList Items.Item (X) ends then the next RS Int = 0 SelectedColumns.Items.Count to y for - 1 RightSideCount + = 1 next to the LeftSideCount + RightSideCount & lt; = 15 then 'move the item right to z as integer = 0 to LeftSideCount - 1 SelectedColumns.Items.Add (SelectedItemsArray (Z)) column list. ITEM Remove (Etherwise selected) Next E Lse do not move objects' end if end sub  

Is there any way I can do this without being a postback?

Any suggestions could be in advance thanks to anyone!

No problem, I figured it out. Originally I thought this would:

In my case it would not work because there were many differences between that poster and I was actually trying to do it. It is revealed, however, this solution is necessary to me anyway thanks!


Comments