如何使用样式-URL标记,HttpContext.Current.Request.Url.Host和HttpContext.Current.Request.Url.Authority on .aspx页面(想要检查它是否是localhost或不是直接)?三元条件之间的HttpContext.Current.Request.Url.Host和HttpContext.Current.Request.Url.Authority aspx页
这里是例子:
"div style='<%= "height: 1115px; background-image: url(\"" + "http://" + HttpContext.Current.Request.Url.Host.ToString() +"ImagePath"); background-position: bottom center; background-repeat: no-repeat;" %>'"
我要检查它是否为localhost,然后它会采取管理局,如果没有,那么它必须采取主机。
你可以发表你想要的样本。 –
@PatrickHofman - 在我的项目中添加了一个div标签。 –