.NET (web) How to execute some code after all events are handled?
I have this .NET web app that draws a table in Page_Load.
Then after that it handles the events, which should change the table drawn in Page_Load. This is very inefficient.
Is there a way to execute the code (which draws the table) after it finishes handling all events? (instead of doing it in Page_Load)
Thank you in advance.
Check out the ASP.NET Page Life Cycle Overview for more info.
Check out the OnPreRender event in the page lifecycle.
You could also put the code in a Timer tick event with an interval of 1, which will fire after all the events.