This is a migrated thread and some comments may be shown as answers.
Menu does not work with Areas
2 Answers 38 Views
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Uday
Top achievements
Rank 1
Uday asked on 20 Feb 2012, 09:07 PM
I have the following ASP.NET MVC3 project using Razor.  I have couple of areas and the default routing changed to route to a login page instead of default home page.  However, when I do this, I cannot go from a page under an area to the main HomeController.  I have attached a test project where I was able to produce the same issue.  

In the attached project, when you launch, the project presents a login page.  From there, click on Process Visit.  It works fine.  However, if you click on Home or About, they both don't work.  Home link does not work at all, where as, the About link takes you to About View in whatever the area you are in.  

I want the control to come to the main HomeCOntroll on clicking home.  I have gone through the forum and tried different syntax. However, it still does not work.

MVC Version: 3
Visual Studio: 2010
.NET Framework: 4.1

I appreciate any help.

2 Answers, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 23 Feb 2012, 01:07 PM
Hello Uday,

 
I was able to observe the depicted issue, but I believe that the problem is not related with the Menu itself. After I replace the Menu component with ActionLinks the same erroneous behavior can be observed. Check the modified test project. I will ask you to send us a working test project using ActionLinks and then I will help you to put Menu component in it.

All the best,
Georgi Krustev
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now.
0
Uday
Top achievements
Rank 1
answered on 24 Feb 2012, 01:42 PM
Hello Georgi,

   Thank you for your response.  I do know that it is a routing issue and not related to Telerik Menu.  I wanted to see if there is a way to configure the menu to make it happen.  However, I have found a solution.  I have attached the solution here.  It is pretty simple.  We need a routing information in Global.asax.cs about Home controller.  One more interesting fact is that the action should not be Index.  It can be anything other than Index and one can redirect that action to Index action in HomeController.  

I have attached the solution to this message.  If there is a better solution, please let me know.

Thank you for your time,

Uday
Tags
Menu
Asked by
Uday
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Uday
Top achievements
Rank 1
Share this question
or