类似于 ASP.Net AjaxPro 的框架
目前,我正在使用 AjaxPro 框架 (http://www.ajaxpro.info/) 来调用任何来自客户端的 Web 应用程序中的方法。
但用户在使用它时遇到了一些严重的问题。 (例如,成功回调在 Chrome 中不起作用。有关问题的更多信息可以在以下位置找到:AjaxPro 在本地工作,但在服务器上我收到 .ashx 错误)
我想用一个框架替换它,该框架可以:
- 调用我的代码中的任何方法。即使它是在类库中定义的。在 AjaxPro 中,我可以在任何地方定义一个方法并向其添加 [AjaxPro.AjaxMethod] 属性。现在该方法可以在任何客户端 js 代码中调用,即使它们位于两个不同的类中。
- Doen 依赖于网络表单。我可以使用 ScriptManager 将 AjaxPro 替换为 ASP.Net Ajax,并将 [WebMethod] 属性添加到我的方法中,并从该页面方法调用解决方案中的任何其他方法。但我使用的是 .ascx 文件,并且页面方法无法在 .ascx 文件中定义(它们必须在 .aspx Web 表单中定义)。
- 最好是免费的。 (我想在 YetAnotherForum 项目开发中使用它)。但如果只有付费框架可用,我会很乐意付费。
是否还有其他具有 AjaxPro 功能的 Ajax 框架?
Currently, I'm using AjaxPro Framework (http://www.ajaxpro.info/) to call any methods in my web application from the client side.
But users have some serious problems using it. (e.g success callbacks don't work in Chrome. More info about the problems could be found at: AjaxPro is working locally, but on server I am getting .ashx errors)
I'd like to replace it with a framework that can:
- Call any method in my code behind. Even if it's defined in a class library. In AjaxPro I could define a method anywhere and add [AjaxPro.AjaxMethod] attribute to it. Now the method could be called in any client-side js code, even if they were in two different classes.
- Doen's depend on web forms. I could replace AjaxPro with ASP.Net Ajax by using ScriptManager and Add [WebMethod] attribute to my methods and call any other method in my solution from that page method. But I'm using .ascx files and Page methods cannot be defined in .ascx files (They have to be defined in .aspx web forms).
- Preferably free. (I'd like to use it in YetAnotherForum project development). But if only a paid framework is available, I'll be glad to pay for it.
Is there any other Ajax framework which has the AjaxPro functionality?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我建议使用 jQuery。它正在成为要使用的客户端 JavaScript API。甚至 Microsoft 似乎也倾向于使用 AJAX 客户端 API。您可以使用 .ajax 方法 调用页面中的任何方法,示例。我从未在 UserControl 中尝试过它,但只要该方法用 WebMethod 属性修饰,我不明白为什么它不起作用。
I would recommend using jQuery. It is becoming the client javascript API to use. Even Microsoft seems to be inclining towards it in favor of their AJAX client side APIs. You can call any method in a page using the .ajax method, sample here. I have never tried it inside a UserControl, but as long as the method is decorated with a WebMethod attribute, I don't see why it wouldn't work.
我相信你有一个公平的选择。
看看 http://ajaxpatterns.org/DotNet_Ajax_Frameworks#Lists
在我的新工作中,我们正在使用 ajaxpro,然而,我也遇到了问题,目前正在研究替代方案。
I believe you have a fair choice.
Look at http://ajaxpatterns.org/DotNet_Ajax_Frameworks#Lists
At my new job we're using ajaxpro, however I also have come across issues and am currently researching alternatives.