I'm using the ListView control (ASP.NET 2008) to show a bunch of lines of data, and at the bottom I want some totals. I was initially going to define the header and footer in the LayoutTemplate and get the totals with some local function, i.e. <%#GetTheSum()%>, but it appears that the LayoutTemplate does not process the <%#...%> syntax.
Another thought would be to put a Label in the LayoutTemplate and use FindControl to update it. Not sure if that's possible (will try shortly).
What's the best way to show totals using a ListView?
UPDATE: Solution here.