KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
While reading about mcv3 I came across an attribute name called [ActionName] . It actually gives a new name to the action method. I tested a scenario which made me think; how are the internals working. When I have the following two action methods in my controller class [ActionName("Test")] public ActionResult Index() { return View(); } [ActionName("Index")] public ActionResult Test() { return View(); } I thought this will end up in some kind of infinite loop or will give some ambiguity exception. But the same works fine and the second method is called when i give this url http://mysite:1234/mycontroller What made MVC engine to choose the second method and not the first? Any idea why this happens?
Tags (comma-separated)
Save Edits
Cancel