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 ??
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Amit Kumar SinghRank #562 · 4.3K reputationPosted Dec 10, 2016, 10:21 PM EST
Amit Kumar SinghRank #562 · 4.3K reputationPosted Dec 10, 2016, 10:20 PM EST
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
Salman BegRank #284 · 8.8K reputationPosted Dec 10, 2016, 10:48 PM EST