1

I was using MVC 1.0 RTM, and the Haack solution for Areas

I just recently moved to MVC2 RC and I'm using single project areas with my controllers in separate assemblies. My problem is that in the MVC 1 solution I ALWAYS had "area" in my RouteData.Values collection, in MVC2 RC it doesn't exist. Do you know how to get this in MVC2 RC?

Thanks in advance!

sabanito
  • 1,501
  • 1
  • 12
  • 17

1 Answers1

4

This is kept in a DataToken for the route. Namely, route.DataTokens["area"]. Look at AreaHelpers.cs in the MVC source for details.

By the way, when you ask a question like this, you should show the code you're using which is not working. It makes it much easier to supply an answer. Right now, I don't know if you've already tried the method above, but are making an error with it, or if you haven't discovered this yet.

Craig Stuntz
  • 125,891
  • 12
  • 252
  • 273
  • Thanks for your answer Craig, and sorry for not posting code, i'll try to be more specific next time! – sabanito Jan 04 '10 at 23:21