ASP. NET page refreshing and timed jump code sorting

Source: Internet
Author: User

Refresh implementation method:
========================================================== ===. Net
// 1st:
/* -- Built-in jump ----*/
Response. Redirect (request. url. tostring ());
// 2nd:
/* ---- Built-in HTML ----*/
Response. addheader ("refresh", "0 ");
// Add the specified header and value to the HTTP header of the 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; url1_target.html"> Use window. Location. href
// 7
<Script language = ''javascript ''> window. navigate (" this page url "); </SCRIPT>
========================================================== ======================================
Timed Refresh:
1,
<SCRIPT> setTimeout ("location. href = 'url'", 2000) </SCRIPT> Description: The URL is the URL of the page to be refreshed.
2000 is the waiting 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 an absolute URL to be loaded.
N is the waiting time, in seconds.
URL is the URL of the page to be refreshed
3, <% response. Redirect URL %> Note: Generally, you can use a URL parameter or a form value to determine whether an operation has occurred (this is not clear yet. I have not tried it)
My opinion
1. <script language = JavaScript> in XHTML 1.0 (the standard in vs08), <SCRIPT type = "text/JavaScript">
2. There are call methods in vs. You can register scripts on the client.
3. Actually, there are several principles. Not that troublesome.
Related Article

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.