Lazy-Load TabPanels

Matt Berseth’s blog talks about lazy-load for the Ajax Toolkit Tab Panels: http://mattberseth.com/blog/2007/07/how_to_lazyload_tabpanels_with.html

The basic idea is to put an update panel inside each tab panel, along with a hidden button as the async trigger of the update panel. The tab panel provides an OnClientActiveTabChanged event, which then calls a JavaScript to click on that hidden button, which in turn causes the postback and the button click event will perform the databinding. In addition, one of the comments suggested another approach by wrapping a update panel around the tab container. While doing this achieves the lazy-load, it also causes the reload of the whole tab container every time, which is rather unpleasant – less of the Ajax feel. The post itself is really useful and it also provides sample code. It’s more helpful to just read the blog than my words here. =)

By Bryan Xu

Posted in Ajax Controls

Leave a Reply