我试图在Create视图中显示一个类对象,其中属性是ICollection<string>.
例如...
namespace StackOverflow.Entities
{
public class Question
{
public int Id { get; set; }
....
public ICollection<string> Tags { get; set; }
}
}
如果视图就像 StackOverflow 的“提问”页面,其中的Tagshtml 元素是单个input box.. 我不确定如何在 ASP.NET MVC3 视图中做到这一点?
有任何想法吗?
我尝试使用EditorFor,但浏览器中没有显示任何内容,因为它不确定如何呈现字符串集合。