Archives
- ► 2013 (8)
- ► 2012 (35)
- ► 2011 (157)
- ► 2010 (174)
- ► 2009 (12)
Which topics would you like us to cover more?
Latest comments
-
How to create an application s...
Maybe some of the other posts will help you too: d...
By Bas -
How to create an application s...
Hi Joe! Glad this post and the discussion is helpf...
By Bas -
How to create an application s...
Ok, I think I'm getting my head around it now... t...
By Joe -
How to create an application s...
this is probably the most helpful discussion ive c...
By Joe -
How to shutdown your server wi...
IT didn't work with centos 6
By David -
How to reset you Kindle 3, eve...
Thank you! I was in the middle of listening to a b...
By Madison Woods -
Using a client certificate wit...
Thanks Bas
By betsy -
Using a client certificate wit...
Hi Betsy, No there isn't. Java runs in a virtual m...
By Bas
Latest tweets
| Using REDIPS.drag to add drag and drop to your .Net webapplication |
| Written by Division by Zero |
| Saturday, 19 May 2012 21:09 |
|
The REDIPS.drag is a free Javascript drag and drop library. I't easy to use and flexible. I love it. Here is an example how to integrate this library to you .Net webapplication. The redips site and the library download provides a lot of examples on how to work with this library. This example will focus on using it in a .Net page. At first we will setup the page. In the header we will include the library and our own configuration script (dragdrop.js): Then you can add the div's (that will be draggable, see the examples coming with the library) to the page. I prefer to add an UpdatePanel around it to make the drag and drop actions and the postback that will follow it seem fluent. The content of the page is copied from one of the examples. At the end a hidden field is added (Id is DragAction). This will be used to contain the information on which element is dropped on which location. In the DragDrop.js we will setup de drag and drop actions. Here we will handle the item dropped event and add the information to the dragAction hidden field. Then it will submit the form (thus perform a postback). So now, if you drag and drop one of the draggable elements, there will be a postback containing the information on the latest event. In the code behind you can do something like this. Of course you can build the page in the aspx file or from the codebehind. It will help you to simply create user friendly drag and drop actions. Tags:
|
If the human brain was simple enough for us to understand we'd be so simple we couldn't understand. - Unknown














Comments
Thank you.
Giz
Thanks for the compliment. I've uploaded a sample solution with the code as described here. I hope it will help you getting your code working!
Download the solution here:
dib0.nl/.../REDIPS_Example.zip
Bas
Thank you so much, you are an absolute legend - the code worked brilliantly and made the whole thing make sense.
Thanks again much appreciated.
Giz
You're welcome! Glad I could help!
Bas
RSS feed for comments to this post