【发布时间】:2011-10-05 00:35:09
【问题描述】:
我正在尝试在Create 视图中显示一个类对象,其中属性是ICollection<string>。
例如...
namespace StackOverflow.Entities
{
public class Question
{
public int Id { get; set; }
....
public ICollection<string> Tags { get; set; }
}
}
如果视图类似于 StackOverflow 的“提问”页面,其中 Tags html 元素是单个 input box .. 我不确定如何在 ASP.NET MVC3 视图中做到这一点?
有什么想法吗?
我尝试使用EditorFor,但浏览器中没有显示任何内容,因为它不确定如何呈现字符串集合。
【问题讨论】:
标签: c# .net asp.net-mvc-3 editorfor