only if the logic belongs there. the simplified cycle is:
oninit - use to init controls before postback data loaded
onload - after postback data applied to controls
onclick/etc - server events fired
prerender - after server events
render - produce html
general control init should be done in oninit. onload is used if
controls use viewstate (bad practice - should only be done with
intranets) or for postback data handling.
-- bruce (sqlwork.com)
> Are there any best practices or recommendations around using
> "Page_PreRender" vs "Page_Load"? We are thinking to completely switch to
> Page_PreRender event to handle page's controls initialization requirements.
> I went through some asp.net page life cycle documentations (and diagrams)
> and it seems that we can safely move all Page_Load codes to Page_PreRender.
> Is there any work that we can only do in Page_Load and cannot do it in
> A link to an online article would greatly help.
> Thank you,