1

I am making a custom MVC html helper that is similar in many ways to the built in ActionLink helper. I noticed that the built in ActionLink helper has intellisense for actionName and controllerName parameters which I find very useful. My question is how can I provide intellisense in a custom html helper I am writing which also has actionName and controllerName parameters? Here is my helper:

public static MvcHtmlString IconLink(this HtmlHelper helper, string glyphName, string actionName, string controllerName, object routeValues, object htmlAttributes)
{
   // Implementation
}

Is there an attribute of some sort I can use to make intellisense apply to certain parameters? What am I missing?

Here is the video of the intellisense displaying available controller actions for actionName parameter: http://screencast.com/t/xWtaBYnp

Marko
  • 12,543
  • 10
  • 48
  • 58
  • As in the text telling you what the method is doing? – Jamie Rees Sep 30 '15 at 13:26
  • No as in providing suggestion for available controller and action names. The built in one gives you a list of available controllers and actions in your site. – Marko Sep 30 '15 at 13:28
  • did you put your method to right namespace? – teo van kot Sep 30 '15 at 13:29
  • All my helper extensions are placed in System.Web.Mvc.Html namespace which is where all built in helpers are located... – Marko Sep 30 '15 at 13:31
  • your intelisense does not show up at all, or you want to add a comment for each of parameters for your function? – Robert Sep 30 '15 at 13:42
  • @Robert I updated the original post with a link to a video of what I would like to achieve. Here is the video once more: http://screencast.com/t/xWtaBYnp – Marko Sep 30 '15 at 13:45
  • 2
    is that a re-sharper or just a normal visual studio intelisense, cause i found this article http://blog.jetbrains.com/dotnet/2011/12/07/providing-intellisense-navigation-and-more-for-custom-helpers-in-aspnet-mvc/ – Robert Sep 30 '15 at 13:55
  • @Robert I think you are correct it is Resharper feature. I apologize for not realizing that, I've had Resharper for too long now... – Marko Sep 30 '15 at 13:57
  • no problem @Marko. i'm glad i could help. – Robert Sep 30 '15 at 14:07

0 Answers0