views:

78

answers:

1

Hi folks,

i have this code which I doesn't seem to work in my copy of VS2010 B2 / VS2010 RC.

var areaName = controllerContext.RouteData.GetAreaName();

(originally sourced from here).

Now, it's dealing with Area's, so it's definately MVC 2 stuff.

The error message is that the method GetAreaName() doesn't exist.

Does anyone know the proper code to use, instead?

A: 

This could be work

RouteData.DataTokens["area"];
Mendy