Dec 17, 2008 01:29 AM|exsurgo|LINK
It would be great if .NET 4.0 included an AjaxUserControl where that contol and only that control was updated. ScottGu has something similar posted where he renders a control an returns it as a string via a webservice: http://weblogs.asp.net/scottgu/archive/2006/10/22/Tip_2F00_Trick_3A00_-Cool-UI-Templating-Technique-to-use-with-ASP.NET-AJAX-for-non_2D00_UpdatePanel-scenarios.aspx.
This is great for straight html, but the control can't maintain viewstate or post events. This is because UserControls maintain their viewstate in the same hidden field as the page and every other control. I know that the .NET team has stated they'll
be enhancing viewstate quite a bit, so it would be great to have the option for UserControls to "own" their own viewstate in a separate hidden field, so that they could ajaxified fairly easily.