Click here to Skip to main content
11,491,742 members (73,432 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: ASP.NET VB.NET
I have requirement
I have two listboxes
one list box get data from database then i want drag an item from one list to another list box with out using any button and java script and jquery.
I want to write code only by using Asp.net and C#.net or vb.net.

Please help me how to write the code
Its a great help to me.
Posted 21-Dec-12 2:20am
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Can't be done.

You MUST write some kind of script into the page to support dragging and dropping in a web page. You cannot do it with C# or VB.NET because ASP.NET code runs on the server side ONLY.

The easiest way to do this is jQuery. You can find an example at: Drag and Drop Sortable Lists using jQueryUI, jQuery AJAX, ASP.NET Web Methods and a Detachable Entity Framework Data Repository[^]
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Please refer following link:
http://www.jonasjohn.de/snippets/csharp/drag-and-drop-example.htm
  Permalink  
Comments
Dave Kreskowiak at 21-Dec-12 10:56am
   
To bad your code only works for Windows Forms apps and not the ASP.NET app that the OP asked about. Try reading the complete question next time.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 521
1 Maciej Los 336
2 Andy Lanng 273
3 Sascha Lefèvre 245
4 OriginalGriff 155
0 Sergey Alexandrovich Kryukov 9,829
1 OriginalGriff 8,530
2 Sascha Lefèvre 3,579
3 Maciej Los 3,332
4 Richard Deeming 2,370


Advertise | Privacy | Mobile
Web03 | 2.8.150520.1 | Last Updated 21 Dec 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100