首页 > Web开发 > 详细

ASP.NET 取得 Uri 各项属性值

时间:2016-06-14 12:02:56      阅读:284      评论: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
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!