ASP最好的替代方案。净AJAX UpdatePanel

时间:2022-08-25 17:22:45

Best alternative solution for ASP.NET AJAX UpdatePanel for dynamically add and remove user controls without full postback

ASP最好的替代方案。NET AJAX UpdatePanel用于动态添加和删除没有完整回发的用户控件

4 个解决方案

#1


7  

Use jQuery with ASP.NET Ajax PageMethods:

使用jQuery,ASP。NET Ajax PageMethods:

http://encosia.com/2008/05/29/using-jquery-to-directly-call-aspnet-ajax-page-methods/

http://encosia.com/2008/05/29/using-jquery-to-directly-call-aspnet-ajax-page-methods/

#2


1  

Also, depending on exactly what you're trying to do, you may want to look at WebMethods for updating bits and pieces. I don't know about jQuery's support for it, I haven't used that. But you can use PageMethods, if you're doing simple stuff easily enough, without the need for jQuery.

另外,根据您所要做的事情,您可能需要查看WebMethods来更新位和片段。我不知道jQuery对它的支持,我没有使用过。但是,如果您做简单的事情足够容易的话,您可以使用PageMethods,而不需要jQuery。

http://www.codeasp.net/blogs/Vijjendra/microsoft-net/192/call-pagemethod-from-javascript-in-asp.net-ajax

http://www.codeasp.net/blogs/Vijjendra/microsoft-net/192/call-pagemethod-from-javascript-in-asp.net-ajax

#3


0  

jQuery offers a bunch of handy AJAX calls. I'm not sure how well it would work with user controls but I'm sure you could manage something.

jQuery提供了一系列方便的AJAX调用。我不确定它在用户控件上的工作效果如何,但我确信您可以管理一些东西。

#4


0  

You can use ASP.Net Client Callbacks (here's one walkthrough, there are lots out there) by implementing ICallbackEventHandler on your UserControls. This avoids the full page postback, as it runs a modified version of the page lifecycle, but it has the advantage of keeping the UserControls in your page.

您可以使用ASP。通过在用户控件上实现ICallbackEventHandler, Net客户端回调(这里有一个演练,有很多)。这避免了完整的页面回发,因为它运行的是页面生命周期的修改版本,但是它有保持页面中用户控件的优势。

However I would also recommend jQuery if you can accomplish what you need with it.

不过,如果您能够完成所需的工作,我也会推荐jQuery。

#1


7  

Use jQuery with ASP.NET Ajax PageMethods:

使用jQuery,ASP。NET Ajax PageMethods:

http://encosia.com/2008/05/29/using-jquery-to-directly-call-aspnet-ajax-page-methods/

http://encosia.com/2008/05/29/using-jquery-to-directly-call-aspnet-ajax-page-methods/

#2


1  

Also, depending on exactly what you're trying to do, you may want to look at WebMethods for updating bits and pieces. I don't know about jQuery's support for it, I haven't used that. But you can use PageMethods, if you're doing simple stuff easily enough, without the need for jQuery.

另外,根据您所要做的事情,您可能需要查看WebMethods来更新位和片段。我不知道jQuery对它的支持,我没有使用过。但是,如果您做简单的事情足够容易的话,您可以使用PageMethods,而不需要jQuery。

http://www.codeasp.net/blogs/Vijjendra/microsoft-net/192/call-pagemethod-from-javascript-in-asp.net-ajax

http://www.codeasp.net/blogs/Vijjendra/microsoft-net/192/call-pagemethod-from-javascript-in-asp.net-ajax

#3


0  

jQuery offers a bunch of handy AJAX calls. I'm not sure how well it would work with user controls but I'm sure you could manage something.

jQuery提供了一系列方便的AJAX调用。我不确定它在用户控件上的工作效果如何,但我确信您可以管理一些东西。

#4


0  

You can use ASP.Net Client Callbacks (here's one walkthrough, there are lots out there) by implementing ICallbackEventHandler on your UserControls. This avoids the full page postback, as it runs a modified version of the page lifecycle, but it has the advantage of keeping the UserControls in your page.

您可以使用ASP。通过在用户控件上实现ICallbackEventHandler, Net客户端回调(这里有一个演练,有很多)。这避免了完整的页面回发,因为它运行的是页面生命周期的修改版本,但是它有保持页面中用户控件的优势。

However I would also recommend jQuery if you can accomplish what you need with it.

不过,如果您能够完成所需的工作,我也会推荐jQuery。