I have a View - _Edit which lives in News M/V/C.

I reuse the V/M via the CategoryController as:

return PartialView("/Views/News/_Edit.cshtml", model);

How from within the View - _Edit can I alert the controller name?

When I:

alert('@ViewContext. RouteData.Values["controller"].ToString()');

The Value is: News However, the URL is: /Category/foobar

Is there a way to get the value 'Category' to alert? thanks

Edit
Report