Top "Html-helper" questions

Refers to the `HtmlHelper` class for ASP.

Get DisplayName Attribute without using LabelFor Helper in asp.net MVC

What is the best way to retrieve the display name attribute for an item in your model? I see a …

asp.net asp.net-mvc asp.net-mvc-3 asp.net-mvc-2 html-helper
I want to understand the lambda expression in @Html.DisplayFor(modelItem => item.FirstName)

I’m fairly new at C# and MVC and have used lambdas on certain occasions, such as for anonymous methods …

c# asp.net-mvc razor lambda html-helper
How do I generate a URL outside of a controller in ASP.NET MVC?

How do I generate a URL pointing to a controller action from a helper method outside of the controller?

c# asp.net-mvc asp.net-mvc-3 controller html-helper
MVC5 - How to set "selectedValue" in DropDownListFor Html helper

As the question says: How to set selectedValue in DropDownListFor Html helper? Tried most of the other solutions but none …

asp.net-mvc asp.net-mvc-5 html-helper
What's the point of Html.DisplayTextFor()?

Is there a good reason to use the strongly typed html helper... <%: Html.DisplayTextFor(model => model.Email) %> …

asp.net-mvc html-helper
How to format the value in a strongy typed view when using ASP.Net MVC's Html.TextBoxFor

I am trying to format a date rendered by ASP.Net MVC's TextBoxFor using the value of a strongly typed …

asp.net-mvc format html-helper
Html.ActionLink cannot be dynamically dispatched

I have a problem with MVC3 I'm trying to use @Html.ActionLink() to generate a Link for titles in my …

c# asp.net-mvc html-helper
warnings - html.helpers not recognized after project update

i recently updated my project to mvc 5, EF 6. i updated all the packages via package console manager (update-package). Now i …

asp.net-mvc razor web-config html-helper
Creating a SelectListItem with the disabled="disabled" attribute

I'm not seeing a way to create, via the HtmlHelper, a SelectListItem that will spit out the following HTML: <…

asp.net-mvc html-helper
Pass SelectedValue of DropDownList in Html.BeginForm() in ASP.NEt MVC 3

This is my View Code: @using(Html.BeginForm(new { SelectedId = /*SelectedValue of DropDown*/ })) { <fieldset> <dl> <…

asp.net-mvc asp.net-mvc-3 razor html-helper html.beginform