One Update Panel vs. Multiple Update Panels [closed]

…衆ロ難τιáo~ 提交于 2019-11-28 17:45:20

Multiple panels are much better. One of the main reasons for using UpdatePanels at all is to reduce the traffic and to only send the pieces that you need back and forth across the wire. By only using one update panel, you're pretty much doing a full post back every time, you're just using a little Javascript to update the page without a flicker.

If there are pieces of the page that need to be updated together, there are ways to trigger other panels to update when one does.. but you should definitely be using multiple update panels.

I'd caution that with multiple update panels you'll want to be careful. Make sure you set the UpdateMode to Conditional. Otherwise, when one update panel is "posted back" to the server, all of them are posted back.

I'd highly suggest using these tools

Web Development Helper (here's a brief tutorial Web Development Helper and ASP.NET Ajax)

Fiddler

Any of these answers don't mentioned maintainabiliy comparison between the choices. Third options is that you don't use any update panel and leave your self to the reverse ajax. Check out the interesting projects: PokeIn and VisualJS.NET

I believe it is best to use multiple UpdatePanel if you can because of the size the POST that the UpdatePanel generates. It's even better if you can use manual AJAX approaches for small things like updating a field. The WPF provides some javascript functions and methods to accomplish this. Here's some link that may be helpful:

I recommend multiple updatepanels. Using multiple updatepanels will keep alive the true meaning of using updatepanel in asp.net web applications. And since we can even trigger one updatepanel from another updatepanel this makes it easier to code page-wide controls and behaviour.

I completely agree to use Multiple Update Panel rather than to use single update panel,When you want only a certain part to be postbacked if you want entire page to be postback then it is better to use single update panel.

Make sure that you make the updatemode="conditional" for all the updatepanel otherwise all the updatepanel will get refreshed.

Also Check out the below Post for complete usage for update panel

http://www.codeproject.com/KB/aspnet/Select_List_Box.aspx

Not sure about the best practices, but in my experience multiple panels work well, and reduce the amount of data being sent at one time - resulting in an increase in response time overall. Multiple panels also reduce the complexity of each server call.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!