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.
A while ago I described a problem I had with PHP. I had the same problem using C#. Here's how to force the use of a networking adapter using C#.
I'm really happy with my Mandriva 2010.2 setup. The only thing I mis is working USB devices in my Virtualbox machines. Today I got it working.
First I installed the latest version of Virtualbox (4.1.8). You can download it here. To prevent packaging errors I first deinstalled the standard Mandriva Virtualbox package. The second step is to install the Virtualbox Extention Pack. This will enable USB support.
After that you need to add the current user to the vboxusers group. While trying to configure the usb-devices for my virtual machine I still got an error on this point. It turned out that the super user was able to work with the usb-devices.
To solve the error I needed to change the permissions to the directory /dev/vboxusb (I chmodded it to 777). Now the error was gone, but Virtualbox kept telling me that there were no usb devices connected. to solve this last problem I added the current user to the 'usb' and 'usbmux' groups. After restarting my system my usb-devices were working inside the virtual machines! I hope this will help you if you experience the same problem!
Due an infrastructure setup DNS wasn't working locally. This I found out while working on some PHP code that requested a resource from my own site. The site is hosted on IIS with multiple sites. My site has it's own IP-address.
Requesting the IP-address didn't work, the outgoing address was the same as the incoming. The request to locahost failed. Overriding the hostheader didn't work, because IIS combines IP-addresses with the hostheader and there wasn't an endpoint tot locahost.
The working solution, not the prettiest, was this:
Knowledge is the basis for developing secure applications and systems. There are good resources to gain this knowledge. Microsoft added on to it's extensive library: "How Do I" Videos for Security.