All the data-related modifications were implemented in this manner:
- make the databinding on page_load event
- handle control events (button click, checkbox check, ...) and make the databinding after any change
This was confusing, when we have several controls causing events, which was causing to do the same databinding several times.
So a question arised - how to reduce the number of databindings - where to make the dtabinding. And here is my answer: Do all the data-related changes on PreRender stage. This have a lot of good pooints:
- It runs only once per request
- It runs after all control events, which ensures, that no more flow-changes will arise.
This was a good solution these projects and hope it will also help some of you.
No comments:
Post a Comment