Hmm, I can see that working, but it's got some issues that may come up under
heavy usage, performance-wise. In my case, I've got the datasource
retrieval abstracted out to a provider, caching included such that any time
I say GetStuff(), it will be from the *current* file contents (cache updates
with the file), and populated on the first call of a page by any user
asynchronously. The thing that's causing me problems doing that is that I
should have logic in the initialization method that's only called when the
data is cached but I'm calling it asynchronously during pre-render when it's
not (and actually, I'm doing this in a masterpage, so I don't even have
access to an OnInit() as well). Things start getting messy when the
external file is changed after render but before postback; the cache is
flushed by the file watcher, so the postback OnInit will now make a
synchronous call to re-fill the cache, bypassing the page's async path.
What would be ideal is to be able to programmatically process postback
events again during the prerender step. I thought I had something along
those lines with Page.RegisterRequiresRaiseEvent, but I misunderstood the
method and wound up getting the last control created being reported as the
sender. Maybe something like Page.PersistForPostBack(...), or if the
ViewState would work with them (I tried and it didn't, although I haven't
ruled out that it's possible)