.NET Framework Version 2.0 has been out of time, VS 2005 beta2 is also available. It has been playing ASP.NET in the past few times. It is found that there is soon soon, and it is really not updated. First, from the code from the ASP.NET, it is a very useful feature, especially in Team Work, I think. In .NET Framework Version 1.0 / 1.0, Microsoft teaches us to teach our code and the generation separation: 1. First join the following line to the @PAGE command of the .aspx file: <% @ page language = "VB" autoeventwireup = False "codebehind =" Samplepage.aspx.vb "inherits =" SampleProject.samplepage "%> * Note: The code here can be converted to the src property. You must use the background code file, that is, the .vb file, must In the background code, each control is declared for each control file, you can declare the following: protected withevents lblMessage as label can not, the browser will tell you "The name" lblmessage is not declared "! Follow the original MSDN This is said: The code-behind class is a completion; it's definition; it Contains Instances for All Controls on the page, explicit event binding using delegates, and so on. The above is the previous thing, talk about the present The situation. In .NET Framework Version 2.0, Microsoft tells us that the code is too much in the past, the brother, now we can implement it: 1, @PAGE instructions in the .aspx file or write, but Change to this: <% @ page language = "vb" compilewith = "samplepage.aspx.vb" classname = "Samplepage_aspx"%> Replacing CodeBehind and src properties with CompileWith properties, which is more and more attributes, I I want to be necessary to pay backward compatibility, classname indicates the classes used by the background file.