Difference between HtmlTable and TagBuilder(“table”)
Just wondering what the difference is between these two and what the benefit for one or the other of them would be when I build my table in my HtmlHelper HtmlTable table = new HtmlTable(); and: TagBuilder table = new TagBuilder("table"); This is more or less the same as this question, Why use TagBuilder instead of StringBuilder? but I'm wondering more specifically about the difference between these two . The main difference is that HtmlTable provides typed and correctly named properties for all the valid HTML attributes of the <table> element (e.g. Width , Height , CellSpacing , etc). It also