要求点按钮之后,先显示一panel,之后过5秒再转向。private void Button1_Click(object sender, System.EventArgs e)
{
    this.panel1.Visible=false;
    this.panel2.Visible=true;  
    System.Threading.Thread.Sleep(5000);
  Response.Redirect("www.163.com");
}
用这方法不会显示panel2,就转过去了

解决方案 »

  1.   

    Page.RegisterClientScriptBlock("turnTo","window.setTimeOut(\"self.location.href='你的网页'\",5000));
    大体上这样,未测试
      

  2.   

    没有用呀,直接显示出来了window.setTimeOut("self.location.href='buy.aspx'",5000)
      

  3.   

    Page.RegisterClientScriptBlock("turnTo","<script>window.setTimeOut(\"self.location.href='你的网页'\</script>",5000));
      

  4.   

    Response.Write("<script>window.setTimeOut(self.location.href='http://www.163.com',5000)</script>");
    没问题@!
      

  5.   

    Page.RegisterClientScriptBlock("turnTo","<script>window.setTimeOut(\"self.location.href='你的网页'\</script>",5000));
    也对!
      

  6.   

    兄弟们有没测一下呀,我试了不成哦,书写都有问题
    Response.Write("<script>window.setTimeOut(self.location.href='http://www.163.com',5000)</script>");
    这句提示说不支持,然后直接就转过去了
      

  7.   

    <script>setTimeout(window.location='xxx.aspx',5000);</script>
    直接写在aspx文件中就可以了。
    或者: Response.write("<body onload=setTimeout(window.location='xxx.aspx',5000);></body>");