views:

66

answers:

1

How can I exclude multiple columns when creating a new customer? The other column is the date that the record was created - called customer_dt.

public ActionResult Create([Bind(Exclude = "customer_id")] Customer customer)
{
    /* Do something here ... */
}
+1  A: 

You may provide each field as a comma-separated list. For example:

 [Bind(Exclude="Customer_Id, Name,Description,Active")]
Ben Griswold