tags:

views:

178

answers:

1

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

i.e

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

I've never noticed that syntax before in C#, what is it called?

Thanks

-Matt

+7  A: 

That's an extension method.

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

John Sheehan