码迷,mamicode.com
首页 > Windows程序 > 详细

c#怎么获取当前页面的url

时间:2015-05-17 18:38:30      阅读:188      评论:0      收藏:0      [点我收藏+]

标签:

c#怎么获取当前页面的url  

C# code
HttpContext.Current.Request.Url

 

Request.ServerVariables["HTTP_HOST"] + Request.ServerVariables["SCRIPT_NAME"]

 

Request.ApplicationPath: /testweb
Request.CurrentExecutionFilePath: /testweb/default.aspx
Request.FilePath: /testweb/default.aspx
Request.Path: /testweb/default.aspx
Request.PathInfo:
Request.PhysicalApplicationPath: E:\WWW\testweb\
Request.PhysicalPath: E:\WWW\testweb\default.aspx
Request.RawUrl: /testweb/default.aspx
Request.Url.AbsolutePath: /testweb/default.aspx
Request.Url.AbsoluteUri: http://www.test.com/testweb/default.aspx
Request.Url.Host: www.test.com
Request.Url.LocalPath: /testweb/default.aspx

ALL_HTTP HTTP_CONNECTION:Keep-Alive
HTTP_ACCEPT:**
Accept-Encoding: gzip, deflate
Accept-Language: zh-cn
Host: www.ccopus.com
Referer: http://www.baidu.com/baidu?wd=servervariables&cl=3
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; TencentTraveler ; .NET CLR 1.1.4322)

APPL_MD_PATH /LM/W3SVC/1201924191/Root
APPL_PHYSICAL_PATH D:\WebRoot\sunrise_chen\www.ccopus.com\
AUTH_PASSWORD
AUTH_TYPE
AUTH_USER
CERT_COOKIE
CERT_FLAGS
CERT_ISSUER
CERT_KEYSIZE
CERT_SECRETKEYSIZE
CERT_SERIALNUMBER
CERT_SERVER_ISSUER
CERT_SERVER_SUBJECT
CERT_SUBJECT
CONTENT_LENGTH 0
CONTENT_TYPE
GATEWAY_INTERFACE CGI/1.1
HTTPS off
HTTPS_KEYSIZE
HTTPS_SECRETKEYSIZE
HTTPS_SERVER_ISSUER
HTTPS_SERVER_SUBJECT
INSTANCE_ID 1201924191
INSTANCE_META_PATH /LM/W3SVC/1201924191
LOCAL_ADDR 61.129.112.41
LOGON_USER
PATH_INFO /code/servervariables.asp
PATH_TRANSLATED D:

c#怎么获取当前页面的url

标签:

原文地址:http://www.cnblogs.com/jackalliu/p/4510056.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!