动态地添加在asp.net mvc的按钮点击控件 [英] Add controls dynamically on button click in asp.net mvc
问题描述
我创造,我想提供一个功能,动态添加控件一个asp.net MVC应用程序。我具有其中有对名字2文本框和姓氏其用作一个单一的控制的形式。现在,一个用户可以添加任意数量的这组控件。我能够通过添加Java脚本的页面上这些控件。但我不知道如何当用户提交访问这些控件的值。
I am creating an asp.net MVC application in which I want to provide a functionality to add a controls dynamically. I have a form in which there are 2 text boxes for First Name and Last name which serve as a single control. Now an user can add any number of this group of controls. I am able to add these controls on the page using java script. But I do not know how to access the values of these control when the user submits.
请在此帮助或建议另一种方法
Please help in this or suggest another approach
感谢
推荐答案
有文章读的编辑可变长度的名单,ASP.NET MVC由史蒂夫·桑德森2型。它显示了你怎么办你是在一个干净的,MVC风格在找什么。
Have a read of the article Editing a variable length list, ASP.NET MVC 2-style by Steve Sanderson. It shows you how to do what you are looking for in a clean, MVC style.
这篇关于动态地添加在asp.net mvc的按钮点击控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!