Hi,
Currently struggling with a problem that I've encountered variations on in the past. At the moment a worthwhile solution escapes me, but it seems such an obvious issue that I can't help wondering whether or not there's a "best practice" approach I should adopt.
Without code, here's the issues in a nutshell:
- page has databound control (a repeater) which isn't populated until user inputs data and clicks a button.
- Repeater item template contains a button
- User clicks button, page posts back. On load, the repeater is actually empty so event is never handled because the originating control no longer exists
- Go back to the beginning of wretched cycle
I've confirmed that this is the problem because if you provide the repeater with some static data on page load, everything works fine. But of course that's no use because it has to be populated dynamically.
Is there a commonly approved way round this headache? I can store the data in session and re-use it on page load, but it seems terribly clumsy.
Cheers, Matt