Asp. NET to implement page jump using Window.location.href
Source: Internet
Author: User
In writing ASP.net program, we often encounter the problem of the jump page, we often use Response.Redirect, if the customer wants to jump in the use of tips, this is not a good idea, such as:
Response.Write ("Congratulations to you, registration is successful," <script>alert. ');</script> ");
Response.Redirect ("main.html");
At this time our prompt content did not come out on the jump, and Response.Redirect ("main.html");
This is the realization of our requirements, in the prompt after the jump page.
The most important thing is that the WINDOW.LOCATION.HREF statement can implement a frame of the page after executing the server-side code to refresh another frame of the page (Response.Redirect cannot be reached, at least I did not find):
For example, there are two frames in the index.htm page, Frameleft and Frameright, which refresh the page in the Frameleft after the server-side code is executed on the Frameright page.
Before the most common is registered, automatically refresh the landing box, so that the landing box into the landing page, as long as the registration of successful code after the addition of a paragraph, that can be implemented to refresh another frame of the page. The code is as follows:
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service