asp.net six ways to refresh this page

Source: Internet
Author: User

  This article is mainly on the ASP.net refresh this page of the six methods for a detailed summary of the introduction, the need for friends can come to the reference, I hope to help you.

First:  private void Button1_Click (object sender, System.EventArgs e)    {      response.red Irect (Request.Url.ToString ()); }    second:  private void button2_click (object sender, System.eventar GS e)    {      Response.Write ("      <script LANGUAGE=JAVASCRIPT>WINDOW.L Ocation.href=document. url;      </script> "); }    Third:  private void Button3_Click (object sender, Sys Tem. EventArgs e)    {      Response.AddHeader ("Refresh", "0"); }    Fourth:  Priva te void Button6_click (object sender, System.EventArgs e)    {     //seems a bit wrong?      //response.write ("      <script language=javascript>window.location.reload" ( );      </script> "; }    Fifth: (Need to replace <>)   <script><!--  var limit= "3:00"   if ( document.images)   {      var parselimit=limit.split (":") parselimit=parselimit[0]*60+parselimit[ 1]*1 }  function Beginrefresh ()   {      if (!document.images) returnif (parselimit==1) W Indow.location.reload () else      {          Parselimit-=1curmin=math.floor ( PARSELIMIT/60) cursec=parselimit% 60if (curmin!=0) curtime=curmin+ "+cursec+" seconds after the re-brush this page! "elsecurtime=cursec+" seconds after the brush this page! "Window.status=curtimesettimeout (" Beginrefresh () ", 1000)      } }  window. style= "z-index:102;  left:408px;  position:absolute;  top:232px" ms_positioning= "Text2D" >  & Lt P><font size= "3" > Auto Refresh page </FONT></P>  </DIV>   sixth:  <meta http-equiv= " Refresh "content=" 300;  url=target.html ">  

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.