MVC.NET拖放工具箱在运行时构建布局页面

发布于 2024-10-20 21:18:37 字数 363 浏览 5 评论 0原文

我正在尝试使用 MVC.NET 创建一个拖放样式工具箱,类似于我正在开发的应用程序的 Visual Studio。基本上,应用程序的第一部分允许用户创建将在整个网站中使用的自定义布局。

我尝试了几种不同的方法,但似乎找不到一种有效的方法。我上次尝试使用 jQueryUI 模式来允许用户输入项目的属性,例如 div。这可行,我可以使用 AJAX 将属性值发布到我的控制器。

这就是我陷入困境的地方。我不知道将项目附加到布局页面的最佳方法是什么。我正在尝试使用 Streamwriter,但事实证明很难跟踪该项目在页面上的位置。

我正在尝试通过 jQuery 来完成此操作,但我只是想知道 jQuery 库或 MVC.NET 框架中是否有任何我不知道可能有用的选项。

I'm trying to create a drag and drop style toolbox using MVC.NET, similar to Visual Studio for an application I'm developing. Basically the first part of the app allows the user to create a custom layout which will be used throughout the site.

I've tried a few different approaches to this but can't seem to hit one that works. My last attempt used the jQueryUI modal to allow the user to input the attributes of the item, say a div. This works and I can use AJAX to post the attribute values to my controller.

This is where I get stuck. I don't know what would be the best way to append the item to the layout page. I was toying around with Streamwriter but it was proving difficult to keep track of where on the page the item was placed.

I'm in the process of trying to do it via jQuery, but I'm just wondering if there is any options in the jQuery library or MVC.NET framework which I don't know about that might be useful.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

何以笙箫默 2024-10-27 21:18:37

您看过 jQuery UI Droppable 吗?

Have you looked at jQuery UI Droppable?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文