7 Replies - 11560 Views - Last Post: 31 May 2011 - 12:57 PM Rate Topic: -----

#1 JamesConley  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 19
  • View blog
  • Posts: 340
  • Joined: 09-March 09

Drag & Drop

Posted 31 May 2011 - 07:39 AM

Hey Guy/Gals!

For starters I am new to ASP.NET and have been recently given a new project at work that involves using only VB and ASP.NET. What am I looking for is some information or direction on how to go about coding a drag & drop for clients to upload onto a company server. The client should be able to drag a file over a specific area drop it and flag/mark it to its designated category. I have looked into creating a mouse event handler but I am unsure if this the best way to go about accomplishing this task. Any information or help on this would be greatly appreciated!

Thanks!

Is This A Good Question/Topic? 0
  • +

Replies To: Drag & Drop

#2 Curtis Rutland  Icon User is online

  • (╯□)╯︵ (~ .o.)~
  • member icon


Reputation: 4312
  • View blog
  • Posts: 7,467
  • Joined: 08-June 10

Re: Drag & Drop

Posted 31 May 2011 - 12:08 PM

You're going to have to use Javascript to handle the dragging and dropping. The VB.NET code is executed only on the server, not the client.

That's the biggest thing you'll have to learn in ASP.NET. None of the .NET code is executed client-side. So you can do your backend work with it, but complex client side stuff like this is all Javascript.

You might also be able to get away with not reinventing the wheel. Search "javascript drag and drop upload" or "jquery drag and drop upload". Here's one of the results that you might be able to leverage:

http://aquantum-demo...com/file-upload
Was This Post Helpful? 1
  • +
  • -

#3 JamesConley  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 19
  • View blog
  • Posts: 340
  • Joined: 09-March 09

Re: Drag & Drop

Posted 31 May 2011 - 12:26 PM

That's really great!! It just might work! How do I go about adding the jquery files to my Project in VS2010? I see under Scripts there are some jquery files.. do I replace those?

Thanks for your help!
Was This Post Helpful? 0
  • +
  • -

#4 Curtis Rutland  Icon User is online

  • (╯□)╯︵ (~ .o.)~
  • member icon


Reputation: 4312
  • View blog
  • Posts: 7,467
  • Joined: 08-June 10

Re: Drag & Drop

Posted 31 May 2011 - 12:30 PM

You don't necessarily have to replace them if they're the same version. You do have to add the ones that aren't the same. It seems a standard naming convention is "jquery.project-name.js".

From what I can tell, you'll need to use jQuery 1.6, either download it, or use it hosted from jquery's CDN (or even Microsoft's CDN). Then you can include the other project scripts.

This post has been edited by Curtis Rutland: 31 May 2011 - 12:35 PM

Was This Post Helpful? 0
  • +
  • -

#5 JamesConley  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 19
  • View blog
  • Posts: 340
  • Joined: 09-March 09

Re: Drag & Drop

Posted 31 May 2011 - 12:43 PM

I suppose I should have asked that in a slightly better way. I have added the jquery files under Scripts now; Should I call these in some way? Would this sit on the aspx or behind it? This is were I am confused. As stated earlier I have no real xp with ASP.NET and haven't used VB in 2 years. Thanks for all your help it's much appreciated!!
Was This Post Helpful? 0
  • +
  • -

#6 Curtis Rutland  Icon User is online

  • (╯□)╯︵ (~ .o.)~
  • member icon


Reputation: 4312
  • View blog
  • Posts: 7,467
  • Joined: 08-June 10

Re: Drag & Drop

Posted 31 May 2011 - 12:47 PM

I don't know exactly what to do; I've never used that specific control before. Of course you have to have them included on the page in <script> tags. There's an example of use on the page I linked, but it's using a PHP backend.

Other than that, I can't tell you. Start reading and experimenting, and if this one doesn't work for you, start searching for a new plugin that does work with what you need.
Was This Post Helpful? 0
  • +
  • -

#7 AdamSpeight2008  Icon User is offline

  • MrCupOfT
  • member icon


Reputation: 2216
  • View blog
  • Posts: 9,352
  • Joined: 29-May 08

Re: Drag & Drop

Posted 31 May 2011 - 12:49 PM

Also have a look at RX for Javascript.
Was This Post Helpful? 0
  • +
  • -

#8 JamesConley  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 19
  • View blog
  • Posts: 340
  • Joined: 09-March 09

Re: Drag & Drop

Posted 31 May 2011 - 12:57 PM

Ok will do! Thanks again for your time and insight to this issue!!

View PostAdamSpeight2008, on 31 May 2011 - 08:49 PM, said:

Also have a look at RX for Javascript.


Doing that now! Thanks!!
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1