[Coll] Six Methods for ASP. NET page refreshing

Source: Internet
Author: User

 


First:
Private   Void Button#click ( Object Sender, system. eventargs E)
{
Response. Redirect (request. url. tostring ());
}
Second:
Private   Void Button2_click ( Object Sender, system. eventargs E)
{
Response. Write ( "  
< Script Language = Javascript > Window. Location. href = Document. url;
</ Script > " );
}
Third:
Private   Void Button3_click ( Object Sender, system. eventargs E)
{
Response. addheader ( " Refresh " , " 0 " );
}
Fourth:
Private   Void Button6_click ( Object Sender, system. eventargs E)
{
// Is there something wrong?
// Response. Write ("
< Script Language = Javascript > Window. Location. Reload ();
</ Script > " );
}
Fifth: (to be replaced) <> )
< 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 ) Window. Location. Reload () Else  
{
Parselimit -= 1 curmin = Math. Floor (parselimit / 60 ) Cursec = Parselimit % 60 If (Curmin ! = 0 ) Curtime = Curmin + " Minute " + Cursec + " Refresh this page in seconds! " Elsecurtime = Cursec + " Refresh this page in seconds! " Window. Status = Curtimesettimeout ( " Beginrefresh () " , 1000 )
}
}
Window. onload = Beginrefresh // --> </SCRIPT> <Div style = "Z-INDEX: 102;
Left: 408px;
Position: absolute;
Top: 232px " Ms_positioning = " Text2d " >
< P > < Font Size = " 3 " > Automatically refresh the 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.