【发布时间】:2009-04-05 02:26:36
【问题描述】:
我有一个标准的 ASP.NET MVC 表单帖子。
例如。
<% using (Html.BeginForm<CommentController>(c => c.Create())) { %>
..
<% } %>
(and in the controller)
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult Create(Comment comment)
{ .. }
现在,我如何才能忽略某些值,例如ID 或CreatedOn 属性,它们可能存在于Comment 对象中?
有什么方法可以定义排除/黑名单?
【问题讨论】: