Wednesday, January 29, 2014

MVC 5 & Razor & Html Helpers

Issue:  After some searching around on SO, MSDN, and various other blogs, I wasn't able to get a good list of Html helpers out there for Razor.  I'm sure such a list exists, but I couldn't seem to find one.  So mostly for my own reference, here is a list that I took from the MSDN page, that I pared-down by eliminating the overloads.

I understand that VS Intellisense will give you a similar list, but I feel that a quick-reference list is at times better.

http://msdn.microsoft.com/en-us/library/system.web.mvc.htmlhelper(v=vs.118).aspx

HTML Helper methods:

  • Html.TextBoxFor()
  • Html.TextAreaFor()
  • Html.DropDownListFor()
  • Html.CheckboxFor()
  • Html.RadioButtonFor()
  • Html.ListBoxFor()
  • Html.PasswordFor()
  • Html.HiddenFor()
  • Html.LabelFor()
  • Html.EditorFor()
  • Html.DisplayFor()
  • Html.DisplayTextFor()
  • Html.ValidationMessageFor()
  • Html.DisplayNameForModel()
  • Html.EditorForModel()
  • Html.LabelForModel()
  • Html.NameForModel
  • Html.ValueForModel()

  • Html.Action()
  • Html.ActionLink()
  • Html.BeginForm()
  • Html.BeginRouteForm()
  • Html.Checkbox()
  • Html.Display()
  • Html.DisplayName()
  • Html.DisplayText()
  • Html.DropDownList()
  • Html.Editor()
  • Html.EndForm()
  • Html.Hidden()
  • Html.Id
  • Html.IdForModel
  • Html.Label()
  • Html.ListBox()
  • Html.Name
  • Html.Partial()
  • Html.Password()
  • Html.RadioButton()
  • Html.RenderAction()
  • Html.RenderPartial()
  • Html.RouteLink()
  • Html.TextArea()
  • Html.TextBox()
  • Html.Validate
  • Html.ValidationMessage()
  • Html.ValidationSummary()
  • Html.Value()


No comments:

Post a Comment