views:

55

answers:

3

Something like

new Div
{
  new A{Href = "test", Content = "link"},
  new P("text"),
}.ToString() == "<div> <a href='test'> link </a> <p>text</p> </div>"
A: 

I would go with the flow though and choose asp.net or asp.net MVC. Asp.net has an object model which is slightly (radically, really) different from your example, but it's part of the core .net framework and very well supported.

klausbyskov
A: 

I agree with @klausbyskov, however that being said ... you might want to take a look at the HTML Agility Pack:
http://www.codeplex.com/htmlagilitypack

it's mostly for parsing, but it should be able to give you a writable HTML dom that you can use. it probably won't be the format/API you're asking for, but it may be close

Joel Martinez
+1  A: 

There it is http://sharpdom.codeplex.com/

dotneter