Currently doing. NET learning many students for ASP.net jump page of several methods is not very clear, understand ASP.net jump Page three ways, for future programming will have a lot of help, the following we will look at:
1, Response.Redirect This jump page method jump speed is not quick, because it wants to walk 2 back and forth (2 times postback), but he can jump to any page, no Site page restrictions (that is, can be jumped from Yahoo to Sina), at the same time can not skip login protection. But slow speed is its biggest flaw!redirect jump mechanism: First is sends an HTTP request to the client, the notification needs to jump to the new page, then the client sends the jump request to the server side. Note that all the data information stored in the internal space after the jump is lost, so you need to use the session.
2, Server.Transfer fast, only need one postback, but he must be under the same site, because it is a method of the server. In addition, he can skip login protection. You can write a small program to try: Design a page to page two of the jump, but to enter the page two need to login, form certification, but if the jump statement using transfer words, it will not pop-up login page. The redirection request of this method occurs on the server side, so the URL address of the browser still retains the address of the original page!
3, Sever.execute This method is mainly used in the page design above, and he must be to jump the same site under the page. This method is needed to insert the output of one page into another ASPX page, mostly in a table where one page is similar to nesting in another.
Summarize:
When you need to jump the user to a page on another server, use the redirect
When you need to jump the user to a non-ASPX page, such as HTML, use redirect
When you need to keep the query string as part of the URL to the server, because the other 2 methods can not do 2 times postback, the data back to the server, using redirect
Requires a transition between ASPX pages (not involving logins), using transfer
Use the Execute method when you need to insert the output of an ASPX page into another ASPX page.
Of course, forget there is a hyperlink! Of course, there's no need to talk too much about it. He is using hyperlinks when they need a user to decide when to jump the page.
The above is the ASP.net jump page of the three methods, each method of the implementation of the method are different, I hope we can understand and skilled use of each method.