Intellisense do not find actions

I have added new route to routes table to omit controller names from url. Everything works fine at runtime but at design time I have noticed that Intellisense do not gives any suggestions and marks Actions(MyActionName in my demo) as not found when I use @Html.ActionLink("Label", "MyActionName") method. Is such Intellisense behaviour normal?

    new { controller = "Home", action = "Index", id = UrlParameter.Optional }



I don't understand your question. For which method Intellisense doesn't show up? In this case you can only expect Intellisense for the ActionLink helper when you type @Html. in your view and that's the best you could hope for out of the box:

The arguments of this method are just magic strings, so don't expect them to show up in Intellisense.

If you want strong typing and Intellisense you could use either MVCContrib which provides strongly typed versions of this helper which allows you to do this:

@(Html.ActionLink<HomeController>(x => x.MyActionName(), "label"))

or T4MVC:

@Html.ActionLink("label", T4MVC.Home.MyActionName())

For me Intellisense never worked for an action so what I do is I write the controller name first and then I get the full intellisense to the all the actions available within that controller.

 @Html.ActionLink("Link text","","Home")

In the above case I just put "", an empty string for the action and after comma I got full intellisense for my controllers. After writing/selecting my controller name when I click between the quotation marks for the action name I get full intellisense for the actions available within specified controller(in the above code,Home).

I am not sure thats the best way but its working for me.

Need Your Help