It is quite possible that I may not have got the point, but I really can't figure out how ASP.Net MVC's HTML Helpers can help me. Here's a sample: -
HTML:
<a href="ActionName" target="_blank">Click Me</a>
HTML Helper:
<%= Html.ActionLink("Click me", "ActionName", null, new {target="blank"}) %>
My eyes are reading HTML more easily, and it seems counter-intuitive to use the HTML helpers.
Look at the following arguments:
- A lot of people (even novices) know how to read HTML. The HTML helper syntax can confuse easily.
- In many cases you need to do more typing writing an HTML 'helper', then you need to write the actual HTML.
- The HTML helper is going to spew real HTML anyway, so why not write HTML directly?
- Writing HTML gives you more control over the syntax, and the standards. You can make in confirming to whatever HTML standard you want.
Are there any special compelling reasons that I have not understood (since I am self-educated in MVC and there could be gaps) that should make me want to prefer HTML Helpers?
Or are they just code noise?