开发者

Request.Url and ReferrerUrl

开发者 https://www.devze.com 2023-02-24 05:34 出处:网络
Suppose our site has got a request from a google search result. In that case whe开发者_JS百科n i am taking HttpContext.Current.Request.Url.ToString() and HttpContext.Current.Request.UrlReferrer.ToStri

Suppose our site has got a request from a google search result. In that case whe开发者_JS百科n i am taking HttpContext.Current.Request.Url.ToString() and HttpContext.Current.Request.UrlReferrer.ToString(), what should be the result.


i think HttpContext.Current.Request.Url.ToString() returns your actual website's url

HttpContext.Current.Request.UrlReferrer.ToString()

returns the previous request that linked to the current URL. so you got request from a google search result if its first request and next is your webpage...

that wat i think...


Request.URL would give the URL information about the current page, where URL referrer would be the link of the previous page which requested the current page.

0

精彩评论

暂无评论...
验证码 换一张
取 消