ASP. NET 1.1 vs asp. NET 2.0

Source: Internet
Author: User
1. Public CS Code cannot be directly placed under the project's root directory or outside the APP_Code directory. It must be placed under the APP_Code directory.

2. The newly created Web_Site does not have Global. for asax, you must create a Global application class and the default Global. asax does not bind any CS files, and all program code is stored in Global. within asax. At this time, we need to manually create Global. cs under the APP_Code directory, and then manually bind it.

3. The CS class bound to the new page file does not have a namespace, and the newly created CS class in the APP_Code directory does not have a namespace. You must manually enter the namespace.

4. The newly created Web_Site does not contain Web. config. You need to create a new Web configuration file;

5. Bind the events of the control in the Aspx page to the events of the control in the InitializeComponent function in ASP. NET 1.1 and bind it with the function, as shown below:

Private void InitializeComponent ()

{

This. btnAddAutoBuy. Click + = new System. EventHandler (this. btnAddAutoBuy_Click );

This. btnDelAutoBuy. Click + = new System. EventHandler (this. btnDelAutoBuy_Click );

This. Load + = new System. EventHandler (this. Page_Load );

}

In ASP. NET 2.0, the separation of pages and code is more perfect. functions are defined in classes, and events are declared in apsx to bind functions.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.