title: Ternary Operator in Multiple conditions
body: <p>I have one if condition in c# </p>
  
  <pre><code>    if (item.ReporSubCategoryId == 1 || item.ReporSubCategoryId == 2 || 
          item.ReporSubCategoryId == 3 || item.ReporSubCategoryId == 4)
      {
  &lt;a  href="@Url.Action("GetPdf", "Report", new { report = item.ReporSubCategoryId })" &gt;@item.ReportTitle&lt;/a&gt;
      }
  </code></pre>
  
  <p>I want to this if condition change to be used ternary operator ?</p>
  
  <p>for using show and  hide this  a tag
  (<code>style='display:Myconditions?block:None'</code>)</p>
  
  <pre><code>&lt;a  href="@Url.Action("GetPdf", "Report", new { report = item.ReporSubCategoryId })" &gt;@item.ReportTitle&lt;/a&gt;
  </code></pre>
  
  <p>But i try this code</p>
  
  <pre><code>&lt;a style='display:" @item.ReporSubCategoryId == 1 || @item.ReporSubCategoryId == 2 || @item.ReporSubCategoryId == 3 || @item.ReporSubCategoryId == 4 ?block:None"'href="@Url.Action("GetPdf", "Report", new { report = item.ReporSubCategoryId })" &gt;@item.ReportTitle&lt;/a&gt;
  </code></pre>
  
  <p>But it's not working. Can you give the  correct solution for my wrong ?</p>