Go homepage(回首页)
Upload pictures (上传图片)
Write articles (发文字帖)

The author:(作者)delv
published in(发表于) 2014/1/6 9:11:32
在ASP.NET里得到网站的域名_[Asp.Net教程]

在ASP.NET里得到网站的域名_[Asp.Net教程]

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) '组合成当前网站的域名


来源:网络







If you have any requirements, please contact webmaster。(如果有什么要求,请联系站长)





QQ:154298438
QQ:417480759