http://community.csdn.net/Expert/topic/3754/3754976.xml?temp=.8352014希望大家具体点,还有别的方法没?一定要给明解决的理由。拜托了!

解决方案 »

  1.   

    我现在就想知道
    Page.RegisterStartupScript(Guid.NewGuid().ToString().Trim(), "<script language='javascript'>window.location.href = window.location.href;</script>");

    1、window.location.href = window.location.href这是什么意思。
    2、为什么这段代码用RegisterStartupScript注册了客户端脚本,我在页面中点查看源文件去看不到注册的客户端脚本。
      

  2.   

    1.window.location.href = window.location.href
    就是自身加载自身的意思,说白了就是在当前的状态下再加载一次,就不会有像按F5的那种把上次提交的数据再提交一遍的效果,
    2.当然看不到了,是在服务器端注册的
      

  3.   

    to :ccwq([Kiss Eash Not Teach]) 谢谢,RegisterStartupScript是在服务器端注册的,但是它注册的是客户端的脚本!
    请看:the RegisterStartupScript method places the JavaScript at the bottom of the ASP.NET page right before the closing </form> element.