asp.net - Repeater databound loses data & event on postback - is there a best practice solution? -


currently struggling problem i've encountered variations on in past. @ moment worthwhile solution escapes me, seems such obvious issue can't wondering whether or not there's "best practice" approach should adopt.

without code, here's issues in nutshell:

  • page has databound control (a repeater) isn't populated until user inputs data , clicks button.
  • repeater item template contains button
  • user clicks button, page posts back. on load, repeater empty event never handled because originating control no longer exists
  • go beginning of wretched cycle

i've confirmed problem because if provide repeater static data on page load, works fine. of course that's no use because has populated dynamically.

is there commonly approved way round headache? can store data in session , re-use on page load, seems terribly clumsy.

cheers, matt

if of controls created dynamically, have recreated during post in order events etc hooked up.

if case, take @ control built guy named denis bauer. use slight modifications , it's perfect.


Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -