How to use asp-for TagHelper combined with Reflection
问题 I have a class Foo which contains a lot of properties, I'd like to iterate through all of them into a form. The website is built using ASP.NET Core 2.2 and Razor. How can I build a MemberExpression that asp-for TagHelper seems to expect using Reflection? I've read a couple of post about this on the Forum but none of the answer fits my need. The following snippet doesn't work. @model Foo; <h1>Foo Reflective filling example</h1> @foreach(var property in typeof(Foo).GetProperties()) { <p> <div