473,396 Members | 1,827 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

difference between PreRender event and Page_Load event

Hi

Can someone explain to me what the difference is between a PreRender event
and the Page Load event for a webform?

ch Jimmy

Nov 19 '05 #1
5 4927
..

page_load is before the viewstate is reinstated, and prerender after the
viewstate is restored before the page is drawn to the reposnse stream.
Nov 19 '05 #2
thanks Josh
"Josh" <s@a.com> wrote in message
news:Om**************@tk2msftngp13.phx.gbl...
.

page_load is before the viewstate is reinstated, and prerender after the
viewstate is restored before the page is drawn to the reposnse stream.

Nov 19 '05 #3
> page_load is before the viewstate is reinstated, and prerender after
the viewstate is restored before the page is drawn to the reposnse
stream.

Actually, this is not correct. Page_Load happens *after* ViewState and PostData
is set into all of your server side controls by ASP.NET (modulo any dynamic
controls being created on the page). Page_Init is the event fired prior to
ViewState and PostData being reinstated. Page_Load is where you typically
do any page wide initilization. Page_PreRedner is the last even you have
a chance to handle prior to the page's state being rendered into HTML. Page_Load
is the more typical event to work with. I can't think of a single time I've
needed to handle Page_PreRender in the 4+ years I've been doing ASP.NET (not
to say there aren't situations, but they're more rare than using Page_Load).

-Brock
DevelopMentor
http://staff.develop.com/ballen

Nov 19 '05 #4
> I can't think of a single time I've needed to handle Page_PreRender in
the 4+ years I've been doing ASP.NET (not to say there aren't situations,
but they're more rare than using Page_Load).


I have done it once in 2 years. I had dynamicly loaded controls where the
event fired on one effected the setting of another etc etc, but there you
go.
Nov 19 '05 #5
http://msdn.microsoft.com/library/de...nlifecycle.asp

"Jimmy" wrote:
Hi

Can someone explain to me what the difference is between a PreRender event
and the Page Load event for a webform?

ch Jimmy

Nov 19 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: wardy | last post by:
Hi, I'm hoping someone can lend me a hand....I've got a .NET Web app running on Windows 2000 IIS 5.0 linking to a SQL Server 2000 database. When the database is located on the same server as the...
1
by: John Ninan | last post by:
I have creating dynamic usercontrols in Page_PreRender event. It works fine. But Inside usercontrol i have a Button. PreRender event disable the usercontrol Button click. What can i do to overcome...
1
by: Nikolaj | last post by:
I'm loading a user control using the method: uc = Page.LoadControl("../UC.ascx"); Afterwards I set some variables in uc. For instance uc.Count = 10; Count is the number of link buttons...
3
by: Francois | last post by:
Hi, First of all sorry for the long post but I believe it is quite an interesting as well as advanced and complex problem. I have a problem with the checkbox control I have in my repeater. I...
12
by: Nathan Sokalski | last post by:
What is the difference between the Page_Init and Page_Load events? When I was debugging my code, they both seemed to get triggered on every postback. I am assuming that there is some difference,...
1
by: Usman Ghani | last post by:
Hi There, I want to display below page creation time and so I have two variables as: Dim start_time As New DateTime Dim end_time As New DateTime First I am storing value in start_time on page...
3
by: Matt Jensen | last post by:
Howdy all - and seasons greetings Just wondering, I've recently discovered the PreRender event for .NET (both for the page and for controls), which seems like a life saver for doing page data...
3
by: John Scott | last post by:
Hey I've got an odd problem here. I have two user controls on a single page. Here is the flow of my page Page(OnLoad) UC1(OnPreRender) UC2(OnPreRender) Page(ButtonClick) UC1(OnPreRender)...
1
by: archana | last post by:
Hi all, Can anyone tell me difference between prerender and render. thanks in advance.
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.