在我的要求中我有两个控件文本框和下拉列表,需要动态创建控件并根据按钮单击使用MVC删除控件动态
用户选择项目后,
项目是下拉列表,而下拉列表中不应向用户显示所选项目
example :items: 1 bottle
2 bottles
3 bottles
如果用户选择不应出现在下拉列表中的“1瓶”项目。
enter code here public ActionResult Index()
{
var initialData = new[] {
new Gift { Name = "Tall Hat", Price = 39.95 },
new Gift { Name = "Long Cloak", Price = 120.00 },
};
return View(initialData);
}
[HttpPost]
public ActionResult Index(IEnumerable<Gift> gifts)
{
return View("Completed", gifts);
}
public ActionResult Add()
{
return PartialView("GiftEditorRow", new Gift());
}
当我点击按钮时,两个控件正在不同的视图(页面)中添加,我想在同一页面下面添加我