嗨,我是 mvc 和 bootstrap 的新手。我想在运行时在 mvc4 和 bootstrap 中动态添加两个文本框。我尝试了很多网站,但我无法理解。请给我一个简单的例子
我试过这个
在模型中
public class Gift
{
public string Name { get; set; }
public double Price { get; set; }
}
在控制器中
public ActionResult PanelEx()
{
var initialData = new[] {
new Gift { Name = "Tall Hat", Price = 39.95 },
new Gift { Name = "Long Cloak", Price = 120.00 },
};
return View(initialData);
}
我应该在模型中写什么。如何做下一步..我被卡住了请帮助