开发者

C# web forms api to dynamically create forms

I am working on an asp.net project which has numerous form screens. All our forms are pretty much using a given set layout which needs to be made by developers ond an on again.

Our current implementation requires that for every form control, a developers needs to write inside in the .aspx file the HTML of our forms (whilst embedding our field controls in them).

As a result, we have our project's HTML code scattered in many, many controls all over the place. It is highly possible that we change the HTML of our forms in the future.

Does asp.net C# have anything similar to Drupal's Form API which allows developers to simply create their forms programatically using a "Form Control" of some sort? The developer would add 'rows' with different field controls in them. It 开发者_开发百科is then upto the 'Form Control' to generate the HTML structure of the form in the end.

Using such a method should give me the following benefits:

  • HTML is all in one place - making it easy to change and even skin differently
  • Developers who are not HTML+CSS savvy do not need to tinker out of their comfort zone
  • Fast development of new forms

I had a look online and it looks to me that maybe what I am after is a Hybrid Table Control that is modified to generate Div's (and not necessarily table tags).

Any ideas?


I would:

  • create a master page for the whole web application
  • create a nested master page for the pages where these data controls appear
  • put all necessary CSS, html etc in these master pages
  • create a 'template control' for developers to follow, where they just need to drop items onto a new control.
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜