title: Concatenate within ActionLink with code
body: <p>I am trying to concatenate the <code>c.name</code> with <code>Response.Write(counts[c.ID]);</code></p>
  
  <p>Basically, in the <code>&lt;li&gt;</code>, I want it to be "Category name (x)".</p>
  
  <p>So, basically shove the <code>if</code> statement after the <code>c.name</code>. How can this be done?</p>
  
  <pre><code>&lt;li&gt;
      &lt;%:Html.ActionLink(c.Name, "Browse", "Listing", routes, null)%&gt;
      &lt;%
          if (showCounts &amp;&amp; (bool)(ViewData["ValidCategoryCounts"] ?? true))
          {
              Response.Write("(");
              if (counts.ContainsKey(c.ID))
              {
                  Response.Write(counts[c.ID]);
              }
              else
              {
                  Response.Write("0");
              }
              Response.Write(")");
          }
      %&gt;
  &lt;/li&gt;
  </code></pre>