ASP.NET Atlas, first impressions – Part 2
Well, after some investigation I found something very similar to ICEFaces approach, ASP.NET Atlas guesses which portion of page must be updated, the number of updatePanels on the page doesn’t matter.
My page code is now something like this:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title>Untitled Page</title> </head> <body> <form id="form1" runat="server"> <div> <asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:ScriptManager> <br /> <asp:UpdatePanel ID="contactsPanel" runat="server"> <ContentTemplate> <asp:Label ID="lblName" runat="server" Text="Name"/> <asp:TextBox ID="txtName" runat="server"/> <asp:Button ID="btnSave" runat="server" Text="Save" CausesValidation="False" onclick="btnSave_Click" /> <br /> </ContentTemplate> </asp:UpdatePanel> <br /> <br /> <asp:UpdatePanel ID="echoPanel" runat="server"> <ContentTemplate> <asp:Label ID="lblContactName" runat="server" Text="Contact name:"/> <asp:Label ID="lblTypedName" runat="server" Width="106px"/> </ContentTemplate> </asp:UpdatePanel> </div> </form> </body> </html> |
But again, if we have several updatePanels that already contains data and if we change the contents of only one control on this page all updatePanels will be rerendered? This is my last question. I’ll investigate a little more to find the answer for this question.