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.