views:

303

answers:

1

Does anyone know where I'd be able to find the definitions for the html helper (LinkExtensions) in ASP.net MVC? I'm trying to create my own extension to the ActionLinks and I want to build it upon what already exists. The LinkExtensions (from metadata) only gives me the:

    public static string ActionLink(this HtmlHelper htmlHelper, string linkText, string actionName);
    //
    // Summary:
    //     Returns an anchor tag containing the virtual path to the specified action.
    //
    // Parameters:
    //   htmlHelper:
    //     The HTML helper.
    //
    //   linkText:
    //     The inner text of the anchor tag.
    //
    //   actionName:
    //     The name of the action.
    //
    //   routeValues:
    //     An object containing the parameters for a route. The parameters are retrieved
    //     via reflection by examining the properties of the object. Typically created
    //     using object initializer syntax.
    //
    // Returns:
    //     An anchor tag.

but nothing more. I want to know where and how the anchors are built?

Thanks!

+3  A: 

http://aspnet.codeplex.com/sourcecontrol/changeset/view/23011?projectName=aspnet#288011

Mauricio Scheffer
I already know that, but I was wondering where the hrefs and the links themselves are defined.
Rio
@Rio: just follow the code... Or I'm not understanding your question.
Mauricio Scheffer
Well each of the functions don't exactly show you how each ActionLink is being built?
Rio
Just follow the code. Starting with the link I posted, you'll see that ActionLink ends up calling HtmlHelper.GenerateLink, so navigate there and see how that is implemented, etc.
Mauricio Scheffer