当前位置: 移动技术网 > IT编程>开发语言>.net > 在ASP.NET里得到网站的域名

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

2018年04月29日  | 移动技术网IT编程  | 我要评论

莆田游戏中心,2012年1月思想汇报,妖戏院

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

如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复

相关文章:

验证码:
移动技术网