c# - Difference between HtmlTable and TagBuilder("table") -
What is the difference between the two, and what would I gain for one or the other when I would build my HtmlHelper Table in
  HtmlTable table = new HtmlTable ();   and:
  Tagbuilder table = new tag builder ("table");   This is more or less similar to this question,
But I think more specifically about the difference between the two I am here.
 The main difference is that  HtmlTable  is typed and named for all properties Provides  & lt; Table & gt; Valid HTML properties of  element (such as  width ,  height ,  cellspacing , etc.) Contains the  rows  property, which is a typed archive of  HtmlTableRow  objects that are used for each  & lt; Tr & gt;  represent the element. 
  TagBuilder is a more general API that is definitely an HTML  & lt; Table & gt; , but you will need to do more work in a lesser type of security 
 A concrete example where  HmlTable  help in this way That does not have the  TagBuilder   setting in the .   element on width = "" 
  with HtmlTable : 
  HtmlTable htmlTable = new HtmlTable (); HtmlTable.Width = "100px";     TagBuilder : 
   TagBuilder tag creator = new TagBuilder ("table"); Tag Builder Properties ["width"] = "100px";  
  Note that  TagBuilder  element name,  table , and attribute name,  width , string There are two occasions for error (misspelled) which are  HtmlTable . 
 
Comments
Post a Comment