views:

134

answers:

2

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: http://stackoverflow.com/questions/529711/ajaxpro-is-working-locally-but-on-server-i-am-getting-ashx-errors)
I'd like to replace it with a framework that can:

  1. 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.
  2. 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).
  3. 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?

A: 

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.

Paul Hutchinson
+1  A: 

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.

Jonas Stawski
Webmethods can **only** be used in .aspx pages not .ascx. You see, my problem is exactly this. I want to call methods outside of my page and that contains calling methods in .ascx pages. See the following posts for more info: http://forum.yetanotherforum.net/yaf_postsm38008_AJAX-and-JavaScript-Framework-for-YAF-Going-Forward-.aspx#post38008 and http://encosia.com/2008/04/16/why-do-aspnet-ajax-page-methods-have-to-be-static/ and http://www.dotnetmonster.com/Uwe/Forum.aspx/asp-net-web-services/5849/Web-methods-in-user-controls
Kamyar
The Webmethod attribute can be applied to any method, regardless if it is a page or a usercontrol. The limitation happens when calling the page method using the ASP.NET Ajax client library. I'm not sure if that limitation is for all AJAX calls regardless of the framework.
Jonas Stawski