devforall
devforall

Reputation: 7335

What reference do I need to call UpdateModel?

I am trying to use UpdateModel in a class other than my controller and it doesn't work. When I call UpdateModel in my controller class it works perfectly. The references are the same in both classes.

Would someone please help me out on this?

Upvotes: 0

Views: 176

Answers (1)

Andrew Hare
Andrew Hare

Reputation: 351758

Unfortunately this is not a reference issue. Your controller inherits from Controller which has a virtual UpdateModel method. This allows you to call the method in a derived class. This method will only be available in other types that inherit from Controller and in instances of Controller itself.

Upvotes: 1

Related Questions