|
-
February 23rd, 2009, 10:01 AM
#1
Weird problem with posting user control and listboxes
Hey there,
Ive got a user control ive made that is basically 2 list boxes that allow you to pass data between them both... so you can choose what items from the first listbox you want...
Anyway this is all in a custom user control i have made, the logic all works great until i start bringing the server side into it.
I have 2 buttons that move the items around, and they do it all via JS as i dont want to have to post back to the server every time they move the data around... That part all works great and i can move the items around from the left to the right box etc.
Anyway, when i go to submit to the page the right listbox is always empty, there are no items/selectedindex yet when i submit there may be 5+ items in there. Im assuming that the problem stems from the listboxes not having the data in there from the start so it just ignores it or something when posting... but whatever the cause im in need of a solution, been scouring the net all morning and cant find much.
The main things i need to adhere to are:
- The control cannot refresh the page on moving the data round, this all has to be done clientside
- The 2nd listbox needs to persist through submits, incase any data is incorrect when validating
If anyone knows what im on about and known a possible solution or can point me in the right direction i will give you many thanks!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|