Advice with Dynamic Forms in ASP.NET MVC

前端 未结 4 1752
隐瞒了意图╮
隐瞒了意图╮ 2021-02-06 03:34

I am working on rendering a dynamic form in an ASP.NET MVC view that will meet these requirements:

  • Fields can be validated
  • State is preserved when the for
4条回答
  •  抹茶落季
    2021-02-06 03:40

    How dynamic are your field definitions? If they dont change very often you could use code dom to generate the model and controller once the definition is created. I have not tried this in ASP.NET MVC but it might be a good way.

    http://msdn.microsoft.com/en-us/library/y2k85ax6.aspx

    This article uses code dom for ActionLink generation.

    http://blogs.msdn.com/davidebb/archive/2009/06/01/a-buildprovider-to-simplify-your-asp-net-mvc-action-links.aspx#comments

提交回复
热议问题