在ASP.net中获取参考URL [英] Getting reference URL in ASP.net

查看:67
本文介绍了在ASP.net中获取参考URL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

朋友们,我需要知道一个人来自我网站的参考网址。例如:我有一个名为:www.abc.com的网站,如果有人通过在google.com上搜索找到此链接www.abc.com,那么我想要这个人来自google.com的信息我必须维护参考网址。我在使用c#在ASP.net中工作。如果有人给我任何想法,我会知道。

感谢你。

friends, i need to know the reference URL from which a person comes to my site. for example: i have a site named : www.abc.com if a person finds this link www.abc.com by searching on google.com then i want this information that the person is coming from google.com i have to maintain the reference URLs. i m working in ASP.net with c#. i will apperciate if someone give me any idea to work on.
thanking u.

推荐答案

你好,



使用 Request.UrlReferrer

http://msdn.microsoft.com/en-us/library/system.web.httprequest.urlreferrer.aspx [ ^ ]

此方法返回 System.Uri

http://msdn.microsoft.com/en-us/library/system.uri.aspx [ ^ ]

使用 Uri。 ToString 方法获取 Uri 的字符串表示形式:

http://msdn.microsoft.com/en-us/library/system.uri.tostring.aspx [ ^ ]
Hi,

Use Request.UrlReferrer:
http://msdn.microsoft.com/en-us/library/system.web.httprequest.urlreferrer.aspx[^]
This method returns a System.Uri:
http://msdn.microsoft.com/en-us/library/system.uri.aspx[^]
Use the Uri.ToString method to get the string representation of the Uri:
http://msdn.microsoft.com/en-us/library/system.uri.tostring.aspx[^]


这篇关于在ASP.net中获取参考URL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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