Page.RegisterStartupScript("", "<script>location.href=location.href;</script>");
对于上面的代码,VS2008老是提示我
警告 1 “System.Web.UI.Page.RegisterStartupScript(string, string)”已过时:“The recommended alternative is ClientScript.RegisterStartupScript(Type type, string key, string script). http://go.microsoft.com/fwlink/?linkid=14202”  

解决方案 »

  1.   

    恩 是过时了
    呵呵
    用ClientScript.RegisterStartupScript试一试
      

  2.   

    Page.ClientScript.RegisterStartupScript("", " <script>location.href=location.href; </script>"); 
      

  3.   

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml">
    看到一个页面的最上面的这个标记么,就是这个东西有几个版本,如果你的这个声明太高了,但是你写的html代码却过时了,与声明的不同,不能通过声明的html规范的检查,就会提示你说的那个错误了。
    html规范的版本详情请到www.w3.org去看看。这里是XHTML 1.0 Transitional
      

  4.   

    Page.ClientScript.RegisterStartupScript("", " <script>location.href=location.href; </script>"); 
      

  5.   

    跟这个没关系 这个是w3c的标准 校验前台html的 人家那个是.net~~ 哪儿跟哪儿啊
      

  6.   

    我晕,你有问题呀,.net就没有html了,那个服务器端注册的代码在本地还是行解析成html呀,知道不?