Posts Generate HTML table from list of generic class with specified properties
Post
Cancel

Generate HTML table from list of generic class with specified properties

https://stackoverflow.com/questions/11126137/generate-html-table-from-list-of-generic-class-with-specified-properties

compact version :

1
2
3
4
5
6
StringBuilder sb = new StringBuilder();
sb.Append("<table>");
foreach(var item in MyList){
    sb.AppendFormat("<tr><td>{0}</td></tr>", item);
}
sb.Append("</table>");

origin - https://www.pipiscrew.com/?p=14935 generate-html-table-from-list-of-generic-class-with-specified-properties

This post is licensed under CC BY 4.0 by the author.
Contents

Trending Tags