This project is read-only.

Html.Action using controller not same as baseRoute namespace

Nov 16, 2012 at 5:29 AM
Edited Nov 16, 2012 at 5:30 AM

I tried to render an action of a controller (someController) in namespace (aaa.bbb.controller), which is not the same namespace as the baseRoute in (aaa.ccc.controller), using the following syntax:

Html.Action("Action", "~~aaa.bbb.controller.some", new {})

It does not working, and according to the document, it seems "~~" and "~" will achieve the same result --- they all baseRoute relative

Is it possible to make "~~" really application-based? so it can use controllers from other namespace? Or is there some way to work around this issue?

 

thanks~

Nov 16, 2012 at 2:57 PM

I couldn't reproduce the issue. Please send me a project that reproduces the issue to maxtoroq@gmail.com and I will take a look.

Nov 16, 2012 at 10:52 PM

Hi, it seems I don't need to use full namespace, just using the controller name it will automatically find the controller in aaa.bbb.controller.someController...

sorry for trouble you, I was stucked in the idea of using full namespace to locate the controller, did not try this way,,

thanks you~

Marked as answer by maxtoroq on 10/15/2013 at 9:22 AM