Through server. the transfer method transfers the execution flow from the current aspx file to another ASPX page on the same server, while retaining form data or querying strings, set the second parameter of this method to true, and use server on the first page. transfer ("target Page name. Aspx ", true); used to retrieve data from the target page: ruquest. Form [" Control name "] Or ruquest. querystring [" Control name "]. ASP. net2.0 can also be used in this way,CodeAs follows:
Previouspage PG1;
PG1 = (previouspage) Context. Handler;
Response. Write (pg1.name );
Note: This code is used to retrieve the passed value from the target page. Previous-page is the class name of the original page, and name is the attribute defined on the original page, the data to be transferred is stored in this attribute.
To use this method, you need to write some code to create some attributes so that you can access it on another page. You can access the value on another page in the form of object attributes, this method is particularly useful in inter-page value transfer. This method is not only concise, but also object-oriented.