1

I need to implement many forms in ASP.NET application (for IRS mostly). There are will be a lot of standard controls for each form (textboxes, dropdowns, checkboxes, radio). And business entity assigned to each.

What's the best solution to automate this process? I need to:

  1. Have layout stored in DB (in XML). Layout must support several columns, tabbed interface
  2. Automatically bind business object values to the form
  3. Automatically read form values and write to business object
  4. Must support automatic validation
  5. Some basic workflows support would be good

I used to work with TFS and saw how they implemented WorkItem templates (.wit files). In general this is all I need. But what framework did they build it on? How can I utilize this solution?

I know about Dynamic Data only: http://www.asp.net/dynamicdata

4

1 回答 1

0

你看过asp.net mvc吗?您创建业务实体并将模型绑定到表单。该表单是根据模型的属性数据类型以及您分配给给定属性的任何其他属性自动生成的。

否则,您将需要创建一种机制来从数据库加载 XML 数据,创建给定控件的实例,将值分配给控件的属性,然后将控件添加到表单的控件集合中。一旦完成,您将需要一种将表单上的字段映射到数据对象属性和从数据对象属性映射的机制,最好是通过命名约定。然后对数据做任何你需要做的处理。尽管我鼓励您使用 ajax 和部分页面更新来防止在每个 httprequest 上重新加载完整的页面。

于 2011-11-17T22:34:50.917 回答