Sponsored by Gluten Free Waffles and Sliced Bananas

Thursday, March 25, 2010

MVC: HtmlHelpers Are Extension Methods

4:36 PM Posted by Tyson Nero No comments
Take a stroll through the Object Explorer to the System.Web.Mvc.Html namespace, and you will actually find that MVC HtmlHelper methods are actually Extension Methods of the System.Web.Mvc.HtmlHelper class.

namespace System.Web.Mvc.Html
{
    public static class SelectInputExtensions
    {
        public static string DropDownlist(this HtmlHelper htmlHelper, string name) { }

        public static string DropDownlist(this HtmlHelper htmlHelper, string name, IEnumberable items) { }
    }
}

0 comments:

Post a Comment