星空网 > 软件开发 > ASP.net

Uri各个属性取值测试

asp.net代码:

Uri h_uri = new Uri("http://hovertree.com/tiku/bjaf/3ntux9r9.htm?hewenqi#hewenqipl?ddd#hovertree");Response.Write("<br />Host:" + h_uri.Host);Response.Write("<br />AbsolutePath:" + h_uri.AbsolutePath);Response.Write("<br />AbsoluteUri:" + h_uri.AbsoluteUri);Response.Write("<br />DnsSafeHost:" + h_uri.DnsSafeHost);Response.Write("<br />Fragment:" + h_uri.Fragment);Response.Write("<br />HostNameType:" + h_uri.HostNameType);Response.Write("<br />IsAbsoluteUri:" + h_uri.IsAbsoluteUri.ToString());Response.Write("<br />Segments:" + h_uri.Segments);Response.Write("<br />UserInfo:" + h_uri.UserInfo);Response.Write("<br />Query:" + h_uri.Query);Response.Write("<br />PathAndQuery:" + h_uri.PathAndQuery);Response.Write("<br />OriginalString:" + h_uri.OriginalString);Response.Write("<br />LocalPath:" + h_uri.LocalPath);Response.Write("<br />Authority:" + h_uri.Authority);Response.Write("<br />DnsSafeHost:" + h_uri.DnsSafeHost);

效果:

Host:hovertree.comAbsolutePath:/tiku/bjaf/3ntux9r9.htmAbsoluteUri:http://hovertree.com/tiku/bjaf/3ntux9r9.htm?hewenqi#hewenqipl?ddd%23hovertreeDnsSafeHost:hovertree.comFragment:#hewenqipl?ddd%23hovertreeHostNameType:DnsIsAbsoluteUri:TrueSegments:System.String[]UserInfo:Query:?hewenqiPathAndQuery:/tiku/bjaf/3ntux9r9.htm?hewenqiOriginalString:http://hovertree.com/tiku/bjaf/3ntux9r9.htm?hewenqi#hewenqipl?ddd#hovertreeLocalPath:/tiku/bjaf/3ntux9r9.htmAuthority:hovertree.comDnsSafeHost:hovertree.com

转自:http://hovertree.com/h/bjaf/le50giqm.htm

参考:http://hovertree.com/h/bjaf/1ggypq09.htm#hewenqipl

winform http://www.cnblogs.com/sosoft/p/cspiano.html




原标题:Uri各个属性取值测试

关键词:

*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。

美新跨境:https://www.goluckyvip.com/tag/38610.html
美新物流:https://www.goluckyvip.com/tag/38611.html
美信海外仓:https://www.goluckyvip.com/tag/38612.html
美亚fba:https://www.goluckyvip.com/tag/38613.html
美亚fba头程:https://www.goluckyvip.com/tag/38614.html
美亚海外仓:https://www.goluckyvip.com/tag/38615.html
月活用户超20亿!万亿市值巨头对中国商家进一步开闸放流 :https://www.kjdsnews.com/a/1836412.html
九寨沟周围必去的景点推荐:https://www.vstour.cn/a/363190.html
相关文章
我的浏览记录
最新相关资讯
海外公司注册 | 跨境电商服务平台 | 深圳旅行社 | 东南亚物流