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!

1 Answer 1

3

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

Sign up to request clarification or add additional context in comments.

4 Comments

I already know that, but I was wondering where the hrefs and the links themselves are defined.
@Rio: just follow the code... Or I'm not understanding your question.
Well each of the functions don't exactly show you how each ActionLink is being built?
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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.