1

How is it working when im passing only 2 arguments

List.cshtml

@Html.PageLinks(Model.PagingInfo, x => Url.Action("List", new { page = x }))

Into this method? PagingHelpers.cs

public static MvcHtmlString PageLinks(this HtmlHelper html,
            PagingInfo pagingInfo,
            Func<int, string> pageUrl)
nhx
  • 33
  • 4

1 Answers1

3

The key here is in this part of the method signature: this HtmlHelper html. The this indicates that the method is an extension method on an instance of HtmlHelper.

So the HtmlHelper html supplied to the method is the local Html property.

Patrick Hofman
  • 153,850
  • 22
  • 249
  • 325