English
Modify the web form page file: 1) Delete the HTML tags in the web form page file: ,
2) Change the suffix name of the web form page file, for example: from test.aspx to test.ascx. Renaming the web form page file in vs.net2003 will also cause its background code file to be renamed. For example, test.aspx.cs will automatically be renamed test.ascx.cs
3) Modify <%Page.... %> to <%@ Control.... %> Here you only need to change the value of the Codebehind attribute from test.aspx.cs to test.ascx.cs
4) Modify the background code file-test.ascx.cs Change its parent class from System.Web.UI.Page to System.Web.UI.UserControl
5) Modify OK
Use user controls: From Solution Explorer, drag the user control file test.ascx onto your web forms page