C# Web Forms api 动态创建表单
我正在开发一个 ASP.NET 项目,该项目有许多表单屏幕。我们所有的表单几乎都使用给定的设置布局,需要开发人员一次又一次地制作。
我们当前的实现要求,对于每个表单控件,开发人员需要在 .aspx 文件中写入表单的 HTML(同时在其中嵌入我们的字段控件)。
结果,我们项目的 HTML 代码分散在很多很多控件中。我们将来很有可能更改表单的 HTML。
asp.net C# 是否有类似于 Drupal 的 Form API 的功能,它允许开发人员简单地以编程方式创建表单某种“表单控件”?开发人员将添加带有不同字段控件的“行”。最后由“表单控件”生成表单的 HTML 结构。
使用这样的方法应该给我带来以下好处:
- HTML 全部集中在一个地方 - 可以轻松更改,甚至可以采用不同的外观
- 不懂 HTML+CSS 的开发人员不需要走出自己的舒适区
- 快速开发新表单
我在网上查看了一下,在我看来,也许我所追求的是 混合表格控件,经过修改以生成 Div(不一定是表格标签)。
有什么想法吗?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我会:
I would: