Articles : Page 1 of 1

  • Changing Base Type Of A Razor View

    Changing Base Type Of A Razor View

    Feb 11
    21

    Within a Razor view, you have access to a base set of properties (such as Html, Url, Ajax, etc.) each of which provides methods you can use within the view. For example, in the following view, we use the Html property to access the TextBox method. @Html.TextBox("SomeProperty") Html is a property of type HtmlHelper and there are a large number of useful extension methods that hang off this type, such as  TextBox. But where did the Html property come from? It’s a property of System.We...



  • 1