Can we overload controller in mvc? How?
Hi frnds
I want to know that
Can we overload controller in mvc ? If it is so hiw to do this? Give the example ?
Yesterday i attended the interview that tine i got a thus qus ??
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Amit Kumar SinghPosted Dec 11, 2016, 3:21 AM
Salman BegPosted Dec 11, 2016, 3:48 AM
Amit Kumar SinghPosted Dec 11, 2016, 3:20 AM
You can use the attribute if you want your code to do overloading.
But, you'll have to use a different action name for the same http method (as others have said).
Phil has an article related to this: http://haacked.com/archive/2008/08/29/how-a-method-becomes-an-action.aspx