Why does HtmlHelpers need an argument to this HtmlHelper helper?

Why does HtmlHelpers need to be declared with an argument to the HtmlHelper helper?

i.e

public static string ScheduleEntries(this HtmlHelper helper, ...) 

I have never noticed this syntax before in C #, what is it called?

thanks

Matt

+4
source share
1 answer

This is an extension method .

The way it works for MVC is that the Html in the view is a property of the HtmlHelper type in the ViewPage class.

+9
source

All Articles