Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
由于haacked,我知道它可以接受对象列表作为参数,但是来自复选框的Guids列表呢?这有点不同,因为您获得的唯一名称必须是 ID。
任何帮助将不胜感激,谢谢!
我不确定您是否可以通过这种方式执行 Guid,因为它们不会公开公共 setter 属性。我建议做一个列表,然后遍历列表并使用带有字符串的 Guid 重载:
public ActionResult Foo(IList<string> guidStrings) { var guids = new List<Guid>(); foreach(var s in guidStrings) { guid.Add(new Guid(s)); } return View(guidStrings); }
或类似的东西...