Let us first start with the new events supported at Page Level. Events defined by Control are available only during control development. Events defined by Page are available during Web Form development
1. ASP.NET defines a set of new Page Level events. They are
Page_PreInit(). This is place to set programmatically
- set Master page for the page
- Determine the theme the page is going to us
- Any code to be executed before controls are going to be initialized. Be aware the controls get initialized before Page Init method is called
Page_PreLoad(). This is a place to perform any setup needed in loading of controls in the page. It is guaranteed to be fire after all initialization(PreInit, Init and InitComplete) are complete.
Page_LoadComplete. This is fired after all the types in the page and all the controls in the page are loaded. it also happens before the PreRender event is called for the page or any base page.
Page_PreRenderComplete: This is last chance to make changes to the output stream before being send to IIS
Page_stateEventComplete: here state information of all the controls is committed to View state.
2. you have ControlState behavior that can replace ViewState and takes less memory in print. This enable you to turn off ViewState without losing the ability to store some data on the client. But still it is your responsibility to take care of ViewState size and the effect on performance.
3.you have more scripting support to remove duplicate scripts getting added to the page. In addition Control has Focus method that generates the client side script to ensure that focus is set appropriately.
4. there is cookieless support available for Forms Authentication. There is a cookieless attribute with Forms authentication that can take 4 different values.
5. You can override pre and post functionality with a lot of events associated with httpmodule in 2.0 compared to 1.x versions and there are new eventys
ResolveRequestCache event -used by output cache
MapRequestHandler event – new event that can be used to effect how the pipeline selects a handler, or select one programmatically.
6. This is a feature i was looking for long. Now you have the ability to post to a different web Form has been added. You can set the PostBackUrl of submit button. You can make use of PreviousPage property to get the values of controls in the original page.Here you can make use of late-bound FindControl method or early bound property based method
7. ASP.net has Web Based UI editor for working web.config files for a given web site.
8. There are new security controls like Login,Loginstatus,LoginName, PasswordRecovery, ChangePassword,
9. ASP.net comes with support for roles Manager for authorization ,Memebership provider for authentication