Have there been any changes to the开发者_如何学Python page lifecycle of an ASP.NET web page in 2.0 vs 3.0 vs 4.0 frameworks?
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 theHead
tag.
I could go on but this is getting off-topic :)
Hope this helps a little.
You will see more changes between IIS 6 and IIS 7.0 page lifecycles than between 2.0, 3.0 or 4.0.
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
精彩评论