How can I know which Area my MVC controller action is being called in?

Posted by kripto_ash on Stack Overflow See other posts from Stack Overflow or by kripto_ash
Published on 2010-03-22T14:30:53Z Indexed on 2010/04/03 3:33 UTC
Read the original article Hit count: 366

I want to know how, from a controller action, I could identify the area in which the controller is in via the MVC framework (I mean, without making all controllers in a given area inherit from a base controller with that info).

I'm particularly interested in the case of child actions (controller actions rendered via RenderAction), the area of the calling parent controller for instance.

I'm using ASP .NET MVC 2.0 RTM

© Stack Overflow or respective owner

Related posts about c#

Related posts about asp.net-mvc