I want to make a few boxes that I can drag and drop into other boxes/tables. After searching around the web, it doesn’t seem like a big problem to solve. But how do I know where the boxes have been dropped when i submit the page? I’m using mvc3 so my viewmodel needs to know how the boxes have been placed when the page is submitted. The page consists of other forms that need to be filled out too.
I want to make a few boxes that I can drag and drop into
Share
Use some library like jQuery UI droppable to provide the drag and drop functionality. The library will always expose some event that you can hook up and react to appropriately (e.g. by modifying the values of hidden
inputelements).What you would do exactly inside the event handler depends on the particulars of your application and ViewModel.