之前我是使用JS来保证回传/提交的时候URL不改变

<script language="javascript" type="text/javascript">
    document.getElementsByTagName("form")[0].action = window.location;
</script>

 

以前看这个属性以为跟Request.Url 是一样的
今天调试URL重写参数的时候才发现
Request.RawUrl的内容是用户浏览器地址栏请求的页面地址而Request.Url属性才是页面的实际地址
既然这样我们就可以直接在Load事件中处理这个回传的地址
            //网页重定向
            form1.Action = Request.RawUrl;
之后查看页面源代码
<form name="aspnetForm" method="post" action="/company/15/OnlineOrder.html" >

 

相关文章:

  • 2021-12-02
  • 2022-12-23
  • 2018-03-20
  • 2021-09-30
  • 2021-09-16
  • 2021-11-08
猜你喜欢
  • 2022-12-23
  • 2021-08-14
  • 2021-10-05
  • 2021-12-01
  • 2022-12-23
  • 2021-07-08
相关资源
相似解决方案