DNR
DNR

Reputation: 3736

Changes to ASP.NET page lifecycle

Have there been any changes to the page lifecycle of an ASP.NET web page in 2.0 vs 3.0 vs 4.0 frameworks?

Upvotes: 2

Views: 1158

Answers (3)

Venkatesh
Venkatesh

Reputation: 320

I could see that the difference is just additional of one event called PreInitComplete. In case of .NET3.0 (3.5) we have total of 11 events and in case of .NET 4.0 it is 12 events

Upvotes: 1

KP.
KP.

Reputation: 13730

In terms of lifecycle events such as Init, PreLoad, Load, PreRender, etc. I think these remain the same across versions.

You can check differences using this Page Life Cycle article on MSDN. Simply switch framework versions on the right to review each one.

You may also want to consult What's New in the .NET Framework Version 3.5

AFAIK the most significant changes in the framework have to do with C#, not ASP.NET.

I've converted many ASP.NET 2.0 Website and Web Applications to v3.5 and can tell you that beyond a few obsolete warnings, the projects run fine and can be refactored to remove the warnings within minutes.

A few major differences in ASP.NET framework that I've found useful between 2 and 3.5 is:

  • AJAX is now baked into framework (no need for installation of ASP.NET AJAX 1.0 extensions anymore
  • Better support for nested masterpages - specifically no more errors when using ContentPlaceHolder controls within the Head tag.

I could go on but this is getting off-topic :)

Hope this helps a little.

Upvotes: 5

Oded
Oded

Reputation: 498904

You will see more changes between IIS 6 and IIS 7.0 page lifecycles than between 2.0, 3.0 or 4.0.

Upvotes: 1

Related Questions