How to use Bind Prefix?

Viewed 38598

Say if I had this table in my db: Product

It had

ProductId
ProductName
ProductType

Now for whatever reason I can't name my textboxes ProductName and ProductType so now my View Method would look like this

public ViewResult Test([Bind(Exclude ="ProductId")] Product)

So now through my playing around nothing would be matched in this product since they have different names.

So I guess this is where Prefix would come in but I don't know how to use it. Nor how do I use it and Exclude at the same time.

Can someone give me an example?

1 Answers
Related