Javascript HttpContext.Current.Request.Url.Host和window.location.Host大写

Javascript HttpContext.Current.Request.Url.Host和window.location.Host大写,javascript,c#,asp.net,iis,Javascript,C#,Asp.net,Iis,我知道这是个奇怪的问题,但无论如何,HttpContext.Current.Request.Url.Host或window.location.Host能否返回大写值?我应该使用.toLowercase和.ToLower来确保一切正常吗?使用ToLower()可以工作,因为它是一个字符串值,但是它会对主机地址产生什么影响?如果你明白我的意思,它仍然会显示为192.xxx.xxx System.Web.HttpContext.Current.Request.Url.Host.ToLower();

我知道这是个奇怪的问题,但无论如何,
HttpContext.Current.Request.Url.Host
window.location.Host
能否返回大写值?我应该使用
.toLowercase
.ToLower
来确保一切正常吗?

使用ToLower()可以工作,因为它是一个字符串值,但是它会对主机地址产生什么影响?如果你明白我的意思,它仍然会显示为192.xxx.xxx

System.Web.HttpContext.Current.Request.Url.Host.ToLower();
在我们的例子中,它返回类似“sitename.com”的内容。我们需要确保,在一瞬间它不会返回“siTeNamE.com”。与JS window.location.host相同。