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

1111. appearing after print sequence - php -

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

Ruby on Rails, ActiveRecord, Postgres, UTF-8 and ASCII-8BIT encodings -