I wrote down the application session cookie viewstate cache hidden in Asp.net last week. I thought there should be no problem. You still pointed out the missing or even wrong knowledge points. I would like to thank my brother in the garden: the aspnetx scholar zfw.there has been a lot of GAINS. As a review and sorting method, we will continue this week. This week's topic is: Asp.net's page redirection method. Do you think I have full data? (Please make a picture if you have any questions )......
<A>Tag
1. <a href = "test. aspx"> </a>
2. This is the most common method of steering;
HyperlinkWidget
1.Asp.net server-side control property navigateurl specifies the URL address to jump
2.Navigateurl can be modified using code on the server, which is different from <A>
3.Since hyperlink does not have events, you must set navigateurl in other events on the server.
4. Sample Code
<Asp: hyperlink id = "HYPERLINK" runat = "server" navigatoeurl = "test. aspx"> OK </ASP: hyperlink>
Response. Redirect ()Method
1.Process: Send an HTTP Response to the client, notify the client to jump to a new page, and then the client sends a jump request to the server.
2.After the page jumps, all information saved by the internal control is lost. When a jumps to B, B cannot access the data submitted on page.
3.Use this method to jump to the browser and then change the URL Information in the address bar.
4.You can use session cookies and other objects to transmit data between pages.
5.The redirection operation occurs on the client and involves two communications with the web server in total: one is the request to the original page, and the other is the request to redirect the new page.
Server. Transfer ()Method
1. Implement page Jump and hand over control of the page
2. The stored information such as request session remains unchanged during page Jump. After the jump, you can use the data submitted on the previous page.
3. the URL in the browser address bar remains unchanged after the jump
4. The redirection request for this method is performed on the server. The browser does not know that the page has already been redirected once.
Server. Execute ()Method
1.This method allows the current page to execute another page on the same web server
2.After the page is executed, return to the location where the original page sends server. Execute.
3.This method is similar to calling the requested page by the callback function for the page. You can use the form data of the original page and query the string set.
4.Set the enableviewstatemac attribute of the page command on the called page to false.
Topic related:
1. response is recommended to ensure the validity of HTML output. redirect method; because server. execute or server. the transfer method returns multiple <HTML> <body> tags to the client's page, which is not a legal HTML page and may cause errors in non-ie browsers.
2. Because server. Transfer executes redirection on the server side, it avoids unnecessary network communication and achieves better performance and browsing performance.