当我点击按钮并将其重定向到另一个网站时,如何获取第二个网站页面上的源网站URL。 [英] How To Get The Source Website Url On Second Website Page Load When I Click On A Button And It Is Redirected To Another Website.

查看:93
本文介绍了当我点击按钮并将其重定向到另一个网站时,如何获取第二个网站页面上的源网站URL。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于我是网络应用的新手,我在网站上有链接(比如在ABC.com上),当用户点击此链接时,它会被重定向到另一个网站(比如XYZ.com)。



我想在XYZ.com的页面加载中找到ABC.com的网址。



我们如何找到它也适用于网站在localhost上运行的时候..

As i am new to web application and I have an link on a website (say on ABC.com) when a user click on this link it is redirected to another website (say XYZ.com).

I want to find the Url of ABC.com on the Page Load of XYZ.com.

How we can find it also in the case of when the websites is running on the localhost too..

推荐答案

在Request上下文中使用UrlReferrer属性。它将为您提供请求来自目的地页面的引荐来源网址。
Use UrlReferrer property from Request context. It will give you the referrer URL from where request is come on destination page.


这篇关于当我点击按钮并将其重定向到另一个网站时,如何获取第二个网站页面上的源网站URL。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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