title: HTML generator for .NET?
body: <p>Having used Seaside the past few years I've found template systems to be a bad code smell. Is there a framework for .net using something similar to the Seaside canvas system for generating  html, css and javascript? Or else a way to avoid the duplication I tend to find in templates.</p>
  
  <p>[Edit]
  NHaml does not come close to what I'm looking for. The point is not having a shorthand for (X)HTML, but having a programming language in which I can refactor and reuse the code.</p>
  
  <p>In Seaside, it might look like this: (the canvas is the builder of html [and javascript])</p>
  
  <pre><code>renderContentOn: canvas
      canvas form
          class: 'eventEditor';
          with:[
              self renderWhoOn: canvas;
                   renderButtonsOn: canvas]
  </code></pre>
  
  <p>In this method, I call two subroutines</p>
  
  <pre><code>renderWhoOn: canvas
  self decorateDivAndLabel: 'Who' on: canvas around: [
      canvas select
          id: tagId;
          selected: model who;
          list: model whoList;
          callback: [:value | model who: value]]
  </code></pre>
  
  <p>The first one calls a decorator around a select form element:</p>
  
  <pre><code>decorateDivAndLabel: aString on: canvas around: aBlock
  canvas div: [
      canvas label
          for: (tagId := canvas nextId);
          with: aString,':'.
      aBlock value]
  </code></pre>
  
  <p>This allows eliminating almost all duplication. </p>