Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Page Load or Page PreRender?
Message
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
VB.NET 1.1
OS:
Windows XP SP2
Network:
Windows XP
Database:
MS SQL Server
Miscellaneous
Thread ID:
01345672
Message ID:
01345704
Views:
22
This message has been marked as a message which has helped to the initial question of the thread.
>Hi all,
>
>Recently, we would like to standardize the function calls in the page events, and discussed about what should be putting in Page_Load and Page_PreRender. However, each of us has different opinions and we would like to refer to expert's opinion. Is they any guidelines or best practise for Page_Load and Page_PreRender events?
>
>Any advice would be greatly appreciated, thanks.

I don't claim to be an expert, but I'll give you my opinion. I think PreRender happens too late in the event process for a lot of things. I tend to make all of my calls in either Page_Load or (if I need it to happen a bit earlier) in Page_Init. I would think Page_Load is generally the "best" generic place to put code since viewstate has loaded by then, but it's still early enough in the process for the most common things you need/want to do during the page set-up. You can't intercept thing too many things by the time you hit PreRender (ex. postback events), it's too late to load controls dynamically, etc.
-Paul

RCS Solutions, Inc.
Blog
Twitter
Previous
Reply
Map
View

Click here to load this message in the networking platform