Top "Html-helper" questions

Refers to the `HtmlHelper` class for ASP.

What does 'this' keyword mean in a method parameter?

namespace System.Web.Mvc.Html { // Summary: // Represents support for HTML in an application. public static class FormExtensions { public static MvcForm …

c# extension-methods html-helper
(Razor) String length in Html.Helper?

This is a very simple question. I have a Html.helper: @Html.DisplayFor(modelItem => item.Text) How to I …

razor html-helper string-length
Html.RenderPartial call from masterpage

Here is a scenario: Let's say I have site with two controllers responsible for displaying different type of content - …

asp.net asp.net-mvc master-pages renderpartial html-helper
Asp.Net MVC 2 Html.TextBoxFor Best way to specify a format string for a DateTime property of model

As the question title explains, what is the best way to specify a format which my Views use when displaying …

asp.net-mvc formatting asp.net-mvc-2 html-helper
There is no ViewData item with the key 'Blah' of type 'IEnumerable<SelectListItem>'

This error message is driving me nuts. I'm getting it when using Html.ListBox and Html.DropDownList HtmlHelpers with ASP.…

asp.net-mvc model-view-controller html-helper viewdata
html helper takes a dictionary<string,object>, how to use this parameter?

If a html helper takes a idictionary as a parameter, how do I use it? I tried: <%= Html.Blah( …

c# asp.net asp.net-mvc html-helper
Rewriting Html.BeginForm() in MVC 3.0 and keeping unobtrusive javascript

This is going to seem like a bit of a silly endeavor, but it's something I want to learn nonetheless. …

asp.net-mvc-3 html-helper unobtrusive-javascript html.beginform
Best way to render System.Drawing.Image in ASP.NET MVC 3 View

I have an object of type System.Drawing.Image and would like to display this image in a view. What …

asp.net-mvc-3 html-helper filecontentresult
TagBuilder.MergeAttributes does not work as expected

I am trying to make a HtmlHelper and I need to allow users to add their own custom attributes to …

c# asp.net-mvc html-helper mvchtmlstring
Custom html helpers: Create helper with "using" statement support

I'm writing my first asp.net mvc application and I have a question about custom Html helpers: For making a …

.net asp.net-mvc html-helper