1. response. Redirect ();
Response. Redirect (); can be switched from Server 1 to server 2.The address bar in the browser displays the address of the new webpage.
2. server. Execute (); only page conversions on the local server can be performed. The page conversion is not rigorous. To be precise, the page2 and page1 pages before the jump should be written to the buffer in sequence and output together.In this case, page2 is output first on the same page and then page1. but the address bar on the page still displays the address of the previous page.
3. server. Transfer (); can only be converted on the local server.Similar to server. Execute (), although the page is redirected, the address of the previous page is still displayed in the address bar of the webpage. However, unlike server. Execute () above, this method only outputs page2 pages.
Record: A friend asked me one question tonight: We used session in the developed OA project to only perform session detection on the second page after logon. What about other pages? If you enter the address of another page, can you directly access the address of another page?
Obviously, we only checked the OA operation page after login, and we did not perform session detection on other pages. However, please note that the redirection method we use is not response. redirect (), but server. transfer (), the advantage of this is that, although the user enters other OA operation pages, the user cannot see the address of the OA operation page, because the address bar still displays the address of the OA page after logon. Therefore, the possibility of directly entering addresses on other pages is extremely low.