.NET ez 2012-05-04
以往常用組合方式改變網址結構:
string Url = Request.Url.Scheme + "://" + Request.Url.Authority + Request.RawUrl;
利用 .Net 的 UriBuilder 修改網址結構:
string Url = new UriBuilder("http://www.cscworm.net/") { Scheme = Uri.UriSchemeHttps, Port = 443 }.ToString(); string Url = new UriBuilder(Request.Url) { Scheme = Uri.UriSchemeHttps, Port = 443 }.ToString();
標籤: .NET
本文章網址:
https://www.ez2o.com/Blog/Post/csharp-UriBuilder-Sample-Code
https://www.ez2o.com/Blog/Post/100
https://www.ez2o.com/Blog/Post/csharp-UriBuilder-Sample-Code
https://www.ez2o.com/Blog/Post/100