统计在线人数...

在ASP.NET里得到网站的域名

[ 来源:不详 | 作者:不详 | 时间:2006-7-8 23:00:41 | 浏览:统计中... ]

Dim url, host_url, no_http, host_name As String                   '定义变量
url = HttpContext.Current.Request.Url.ToString                  '获取当前页的URL
no_http = url.Substring(url.IndexOf("//") + 2)                       '截取去掉HTTP://的URL
host_url = "http://" & no_http.Substring(0, no_http.IndexOf("/") + 1)   '组合成当前网站的域名

共有0人参与评价,平均得分:0分
评论内容只代表网友观点,与本站立场无关! 查看完整内容
   

当前在线人数
QQ:748838 MSN:allen_xia#msn.com E-mail:allenxia666#126.com QQ群:28200145