It seems to me that ASP.NET MVC Html Helpers only output XHTML-like tags (closed empty elements), which is not valid HTML.
Is there support for HTML output in ASP.NET MVC?
It seems to me that ASP.NET MVC Html Helpers only output XHTML-like tags (closed empty elements), which is not valid HTML.
Is there support for HTML output in ASP.NET MVC?
True... it'll output typically:
You could certainly write your own HTML Helpers to cover any cases you want.
As pcampbell hinted, you probably need to write your own Html helper to do this. However, it doesn't have to be too hard - if you notice you need one, for example for an
<input>
element, you could simply do this:And then you do the same for every overload you need.