In my MVC application, I need to display data in tabular format (no edit, only readonly) in one of the razor view. Some of the columns should be hyperlink, a couple of columns showing image, and rest columns in plain text.
I know one option is to loop through each row in the dataset (model), and build the table. Anyone has any idea if there is any other way of doing it? (without any third-party control)
Any advice on this, much appreciated.
You can use Phil Haack's tabular template in aspx
or my updated version that is done in razor
About the Visual Studio Add Controller and Add View templates
You may also get some ideas from the List.tt
template in [Visual Studio Install Directory]\Common7\IDE\ItemTemplates\[CSharp | VisualBasic]\Web\MVC\CodeTemplates\