获取当前页面的完整URL网址为散在服务器端 [英] Getting the full url of the current page with url hash on server side

查看:139
本文介绍了获取当前页面的完整URL网址为散在服务器端的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不能让我的工作页面的完整URL。这是我想要得到 HTTP网址://本地主机:54570 /发货/ ShipmentDetails.aspx HawbBLNo = NEC00000004#BFT 结果仅 HTTP://local/Shipment/ShipmentDetails.aspx HawbBLNo = NEC00000004

 保护无效btnSave_Click(对象发件人,EventArgs的发送)
{
    URL = HttpContext.Current.Request.Url.AbsoluteUri;
    UpdateDetails();
    的Response.Redirect(URL);
}


解决方案

有没有办法让服务器端哈希的内容,因为哈希永远不会发布到服务器

看到这个问题的一些技巧如何获得网址哈希(# )从服务器端

I cant get the full url of the page that I am working on. This is the url that I want to get http://localhost:54570/Shipment/ShipmentDetails.aspx?HawbBLNo=NEC00000004#BFTThe result is only http://local/Shipment/ShipmentDetails.aspx?HawbBLNo=NEC00000004 on this code

protected void btnSave_Click(object sender, EventArgs e)
{
    url = HttpContext.Current.Request.Url.AbsoluteUri;
    UpdateDetails();
    Response.Redirect(url);
}

解决方案

there is no way to get hash content on server side because hash are never posted to the server

see this question for some tricks How to get Url Hash (#) from server side

这篇关于获取当前页面的完整URL网址为散在服务器端的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆