If I declare the Bind attribute as a method parameter, it does not work as expected
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult Create([Bind(Exclude="ID")]int ServiceId, Event evnt)
{
var service = dbSrc.GetAll().WithID(ServiceId).SingleOrDefault();
if (service == null)
But if I declare it at the class level, it works!
[Bind(Exclude = "ID")]
partial class Event
{
The form running the create action is in usercontrol and am I using asp.net mvc 1?
My db setup is great. The id column is the primary key and is automatically generated.
What could be the reason? or is this a bug in version 1.0?
Thank you in advance
source
share