Interviews - C# Corner

Shrimant Telgave
Html Helpers are C# methods then why did they call them helpers?

All Html helpers are c# extension methods that are used to generate Html type of string. then why did they not called function/Method instead of Helpers?

By Shrimant Telgave in .NET onOct 04 2019
  • Shrimant Telgave
    Oct, 2019 4

    Because they all generate Html type of element which returns type is “MvcHtmlString” and It is a type of “HtmlHelper” class. All the Html c# extension methods are inside the “HtmlHelper” class. And the people remember them easily.

    Example:

    1. public static MvcHtmlString TextBox(this HtmlHelper htmlHelper, string name);

    More detail:
    Html Helpers are C# methods then why did they call them helpers

    • 1

Most Popular Companies

Most Popular Job Functions

MOST LIKED QUESTIONS