2

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 ... */
}
Andy Evans
  • 6,997
  • 18
  • 72
  • 118

1 Answers1

12

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

 [Bind(Exclude="Customer_Id, Name,Description,Active")]
Ben Griswold
  • 17,793
  • 14
  • 58
  • 60