如何获得精彩的页面网址 [英] How to get perivious page url
本文介绍了如何获得精彩的页面网址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
美好的一天给你。
我写了一个脚本,其中包括喜欢:
考虑网站I和网站II。
当我点击网站上的HyperLink我重定向到站点II。
在站点II中我想要站点I的URL,但是当我使用UrlReferrer时,我得到的是NULL。
任何人都可以帮我解决这个问题吗?
提前致谢。
Hi All,
Good day to you .
I have written a script which consists like:
Consider Site I and Site II.
When i click a HyperLink on Site I it redirect to Site II.
In Site II i want the url of Site I,but when i use UrlReferrer i am getting as NULL.
Could any one help me how can i solve it ?
Thanks in advance.
推荐答案
Request.UrlReferrer
只能与超链接一起使用或锚标签,而不是按钮重定向或Response.Redirect 。
Response.Redirect
对象返回null
。
请参考这些。
还有UrlReferrer和HTTP_REFERRER的替代方案 [ ^ ]
ASP.NET - Response.Redirect不填充Url推荐人 [ ^ ]
希望它有所帮助。
Hi,
Request.UrlReferrer
can only be used with hyperlinks or anchor tags, not with button redirects or Response.Redirect.
withResponse.Redirect
the object returnsnull
.
refer these.
Is there any alternative for UrlReferrer and HTTP_REFERRER[^]
ASP.NET - Response.Redirect Not Populating Url Referrer[^]
hope it helps.
为了解决这种情况,你必须user Server.Transfer(NextPageName);而不是Responce.Redirect();因此,当您从一个页面转到另一个页面时,您将在URL中看到上一页。
我希望它运作良好并帮助你........: - )
For solving this kind of situation you have to user Server.Transfer("NextPageName"); instead of Responce.Redirect(""); So, when you go from one page to another you will be see that previous page in your URL.
I hope it's working well and helping to you........:-)
这篇关于如何获得精彩的页面网址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文