asp.net page refresh and timing Jump code finishing _ practical skills
Source: Internet
Author: User
How to implement the refresh:
===========================================. Net
1th:
/*--built-in Jump----* *
Response.Redirect (Request.Url.ToString ());
2nd:
/*----Built-in HTML----* *
Response.AddHeader ("Refresh", "0");
Adds the specified header and value to the HTTP header for this response.
3rd:
Response.Write ("
<script language=javascript>
Window.location.reload ();
</script> "
);
4th:
/*--output JS Code jump----* *
Response.Write ("
< script language=javascript>
Window.location.href=document. URL;
</script>
");
/* 5th:----JS----* *
Window.location.reload ();
6th:
< meta http-equiv= "Refresh" content= "300; Url=target.html "> with Window.location.href
7
< script language= ' JavaScript ' > Window.navigate ("This page URL"); </script>
===================================================================
Timed refresh:
1,
< Script>settimeout ("location.href= ' url" ",") </script> Description: URL is the page URL address to refresh
2000 is the wait time = 2 seconds,
2,< meta name= "Refresh" content= "N;url" > Description:
n is the number of seconds to wait before loading the specified URL.
URL is a absolute URL to be loaded.
N, is the time to wait, in seconds
URL is the URL address of the page to be refreshed
3,<%response.redirect url%> Description: Generally use a URL parameter or table conveys value to determine whether an operation has occurred (this I have not clear. Never tried.)
My opinion
1.<script Language=javascript> is written in the XHTML 1.0 (VS08 Standard) <script type= "Text/javascript" >
There are calling methods in 2.vs that can register scripts on the client.
3. That's actually the principle. It's not that troublesome.
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.