title: Asp.net Response.Write inside an ascx/aspx file
body: <pre><code>&lt;%if (CanRemove) Response.Write("&lt;b&gt;"+ProductName+"&lt;/b&gt;"); %&gt;
  </code></pre>
  
  <p>This code strikes me as ugly.  More specifically, any time I see a call to Response.Write inside an ascx or aspx file, I get suspicious that I'm doing something wrong.  Perhaps this is due to previously working with XSLT and noticing that when done right, there is rarely a need for <code>&lt;xsl:text&gt;</code> element in order to generate html.  I feel like it interferes with my ability to read the code when my html code is hidden inside a <code>&lt;% %&gt;</code> block.</p>
  
  <p>Is this just something I need to get used to with Asp.Net or is there a better way to do it?</p>