在ASP.NET 3.5中创建拖放应用程序 [英] Creating a drag and drop application in ASP.NET 3.5

查看:97
本文介绍了在ASP.NET 3.5中创建拖放应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要让客户端能够将图像拖放到ASP.NET 3.5网络应用程序的类别文件夹中。



我希望有一个选项存在,这与Ajax Control Toolkit中的重新排序列表几乎一样容易,而且我没有必要查看JQuery或类似的手写代码。



你的建议是什么?



类似的问题之前已经提出过,就像6个月前一样...: ASP.net AJAX Drag / Drop?其中MooTools被推荐,但是在ASP.NET / AJAX世界中有6个月是很长的时间,所以也许更好,更简单选项现在存在?



商业组件也是一个选项 - 高达200 $。

解决方案>

与许多其他第三方提供商一样,我在Ajax Control Toolkit中的Reorder List的经验是,他们大多数似乎并不值得的努力。



不幸的是,很多示例/组件都是基于客户端的,并且总是似乎缺乏现实世界的用途, ASP.Net应用程序所需的各种互动(例如处理回发)。围绕一个div不是那么复杂,但这是很多例子。如果您的需求不完全符合他们的产品尝试其他的东西。



Manning 预订 ASP.NET AJAX in Action 是一个很好的参考代码用于执行拖放操作。它使用Microsoft.Web.Preview,但这在一段时间还没有更新,这是一个担心。我已经用MS的PreviewDragDrop创建了一个非常好的拖放UI,它可以跨浏览器工作,并且很容易编写代码。预览DLL的旁边,曼宁的书非常适合了解微软的AJAX API。



然而,因为jQuery将被发送并支持Visual工作室,我建议使用任何其他任何东西,试图对自己进行防范。






最后一块建议永远不会外包您的核心竞争力。如果此页面是您的产品的核心部分,那么您最好使用jQuery或Microsoft.Ajax等库代码实现,而不是依赖第三方组件。但是,如果这只是您网站的一小部分,请继续使用第三方控件。






参考:我的Microsoft.Web.Preview.dll的版本是1.1.61025.0。


I need to make a client able to drag and drop images into category-folders in an ASP.NET 3.5 web-app.

I was hoping that an option existed, that was almost as easy to use as the Reorderlist from Ajax Control Toolkit, and where I did not have to look into JQuery or similar handcoding.

What are your recommendations?

Similar questions have been asked before, like this 6 months ago...: ASP.net AJAX Drag/Drop? where MooTools is recommended, but 6 months is a long time in the ASP.NET/Ajax world, so maybe a better and even simpler option exists now?

Commercial components are also an option - well up to 200$ anyway.

解决方案

My experience with the Reorder List in the Ajax Control Toolkit, as with many other 3rd party providers, is that most of them don't seem to be worth the effort. Definitely try them before you buy.

Unfortunately a lot of the samples/components out there are all too client-based and always seem to fall short on real-world uses and the sorts of interaction you need with ASP.Net applications (e.g. handling postback). Dragging a div around isn't that complicated, but that's all a lot of examples do. If your needs don't exactly mirror their offering try something else.

The Manning book ASP.NET AJAX in Action is a good reference on code for performing drag and drop. It uses Microsoft.Web.Preview, but this hasn't been updated in quite some time which is a worry. I have created a pretty good drag and drop UI with MS's PreviewDragDrop, it does work cross-browser, and it's pretty easy to code. Preview DLL's aside, the Manning book is great for understanding Microsofts AJAX API.

However, since jQuery is going to be shipped and supported with Visual Studio, I would recommend using it over anything else in a vain attempt to future-proof yourself.


A final piece of advice is never outsource your core competency. If this page is a core part of your offering you're better off implementing it yourself using library code like jQuery or Microsoft.Ajax rather than relying on a 3rd party component. However, if it's just a minor part of your site, then go ahead and use 3rd party controls.


Ref: My Version of Microsoft.Web.Preview.dll is 1.1.61025.0.

这篇关于在ASP.NET 3.5中创建拖放应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆