I have an existing SqlConnection conn; in some controller (using ASP.NET MVC3 + Razor). Now, I would like to render a simple table depending on some SQL command.
The question is:
How to “bind” loaded data in Razor using ViewBag? Is it necessary to iterate row-after-row and produce <tr>....</tr> in Razor?
There is no binding like this. And a simple for loop means it isnt much code either, example…
hope that gives you an idea anyway, and this way you get a lot more control over the style of your rendered table