1

Is it possible to Drag and Drop Listitems from 1 DropDownlist to another DropDownlist with pure ASP.NET and C# without using javascript ?

2 Answers 2

6

No, this is not possible without javascript.

Sign up to request clarification or add additional context in comments.

5 Comments

ok thanks. So when i move listitems from one list to another. Is it possible to track moved items in server side without passing those list items in hiddenfield ? any other way?
All you will get on the server is the final contents of the lists. If you want to keep track of what was moved you will need to use hidden fields or some other way to persist them using javascript during the drag'n'drop phase and pass this information to the server. Actually another possibility would be to persist the initial state of those lists on the server (using session or something) and then on postback you could compare the new values to the old ones and this way you would know which were moved.
"All you will get on the server is the final contents of the lists". Changes made in client does not reflect to server side. I am sorry i dint understand wat u meant ?
And Drag n Drop is from Client side and there is no postback with my dropdownlist now.
When you use javascript to make changes to your lists on the client you are basically modifying the DOM. When you postback to the server those changes will be sent to it. You will of course need to do postback at some stage in order for those changes to be sent to the server.
2

That is client-side behavior. ASP.NET is server-side technology. So no, it is not possible without JavaScript.

3 Comments

ok thanks. So when i move listitems from one list to another. Is it possible to track moved items in server side without passing those list items in hiddenfield ? any other way?
you have to use javascript to send those updates to server, over ajax
Actually i am creating multiple list dynamically and moving list items to them from a static list and finally i need to save those list items to database. How could i use AJAX here ?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.