很久没搞ASP.net的东西了,最近把一个asp的网站改造成ASP.net的咯

突然发现不会自动跳转了,后来查了查资料,恩,其实很简单,因为用了模板页,所以没办法在Meta里面写了

只有用自动跳转,很简单,看代码就知道咯

 

IsPostBack)
        {
            string str = "setTimeout('javascript:location.href=\"AddBigClass1.aspx\"',3000);";
            
this.ClientScript.RegisterClientScriptBlock(this.GetType(), "AutoRedirect", str, true);
        }
OK了~!直接注册,哈哈!

相关文章:

  • 2021-09-18
  • 2021-12-20
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-31
  • 2021-08-30
猜你喜欢
  • 2021-12-12
  • 2022-02-13
  • 2022-12-23
  • 2021-05-27
  • 2022-02-22
  • 2022-02-08
  • 2021-09-10
相关资源
相似解决方案