title: Ternary condition between HttpContext.Current.Request.Url.Host and HttpContext.Current.Request.Url.Authority on aspx page
body: <p>How to use ternary condition with style - url tag, between HttpContext.Current.Request.Url.Host and HttpContext.Current.Request.Url.Authority on .aspx page to (want to check is it localhost or not directly)?</p>
  
  <p>Here is example:</p>
  
  <pre><code>"div style='&lt;%= "height: 1115px; background-image: url(\"" + "http://" + HttpContext.Current.Request.Url.Host.ToString() +"ImagePath"); background-position: bottom center; background-repeat: no-repeat;" %&gt;'"
  </code></pre>
  
  <p>I want to check if it is localhost then it will take Authority and if not then it must take Host.</p>