码迷,mamicode.com
首页 > Web开发 > 详细

ASP.NET 取得 Uri 各项属性值

时间:2016-06-14 12:05:55      阅读:164      评论:0      收藏:0      [点我收藏+]

标签:

Uri uri = new Uri("http://www.yoercn.com/aboutus/idea.html");
string Host = uri.Host;                             //www.yoercn.com
string AbsolutePath = uri.AbsolutePath;     //aboutus/idea.html
string AbsoluteUri = uri.AbsoluteUri;          //http://www.yoercn.com/aboutus/idea.html
string Authority = uri.Authority;                //www.yoercn.com
string DnsSafeHost = uri.DnsSafeHost;      //www.yoercn.com
string LocalPath = uri.LocalPath;                //aboutus/idea.html
string OriginalString = uri.OriginalString;    //http://www.yoercn.com/aboutus/idea.html
string PathAndQuery = uri.PathAndQuery;  //aboutus/idea.html
string Scheme = uri.Scheme;                    //http

ASP.NET 取得 Uri 各项属性值

标签:

原文地址:http://www.cnblogs.com/dckhello/p/5583333.html

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