asp.net - Can I move all logic in Load to PreRender? -


we have user control , in user control there many sub-controls.

the user control reads database , set visibility , other properties of sub-controls.

my friend puts of logic in prerender event , says visibility set in prerender. true?

what best practice of choosing load , prerender? problems have if write logic in prerender?

i copy statements https://msdn.microsoft.com/en-us/library/ms178472.aspx, know i've read them hundred times.

use onload event method set properties in controls , establish database connections.

are there problems if establish database connections in prerender?

prerender: use event make final changes contents of page or controls before rendering stage begins.

why can't use last change rather final minor modification?


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -