views:

72

answers:

1

HI all,

I am looking for a way to generate and validate mvc 2 forms using untyped entities. Basically similar how the propertygrid in winforms behaves.

In the utmost basic sample for instance have an dictionary and generate a form from that depending on the datatype in the Dictionary ofcourse it should be able to fill the same dictionary in the controller.

Any ideas or leads or hints?

Best regards, Emile

+1  A: 

You can use the Html.EditorForModel helper method and customize its appearance using templates.

A great series about that can be found on Brad Wiloson's blog: http://bradwilson.typepad.com/blog/2009/10/aspnet-mvc-2-templates-part-1-introduction.html

Shay Friedman