1

I'm writing a htmlhelper in my proyect like this:

public static MvcHtmlString ActionLinkSpan(this HtmlHelper html, string linkText, string actionName, string controllerName, object htmlAttributes)
    {
        var a = new TagBuilder("a");/*some code*/return MvcHtmlString.Create(a.ToString()); 
    }

and work fine, my doubt is this: when i use

@Html.ActionLink("test", "action", "controller")

the VS suggest me the cotroller's name and then the action's name, in the custom htmlhelper don't. So my question is: There is a way to make VS suggest me the values of the controllers and actions parametres? Thanks in advance.

  • You could look into building helpers that use lambda expressions. – Nkosi Oct 03 '16 at 15:01
  • I'm not sure you understand my question, I make all the things that they said in the other question but do not work (I never believed it work). My html helper works fine. My doubt is: when i wrote @Html.(Ctrl + Space) VS suggest me all the htmlhelpers including my own, but when i make (Ctrl + Space) in the param when we suppose to write the controller name i don't get any suggestion, like in the default @Html.ActionLink – Adrian Acosta Mitjans Oct 05 '16 at 13:48

0 Answers0