O'Reilly logo

Microsoft Visual Studio 2015 Unleashed, Third Edition by Mike Snell, Lars Powers

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

HTML Helpers

HTML helpers are lightweight methods that execute on the server and return a string to be used as standard HTML on your page. They are accessed using @Html, which is essentially a property on your view. The HTML helper classes and related methods are found in the namespace Microsoft.AspNet.Mvc.Rendering.

These helper methods generate UI markup and should only be used on your pages (and not in the controller). Of course, you do not need to use HTML helpers. You can code all your view as actual HTML markup. In addition, many of the HTML Helpers have evolved into TagHelpers (see next section). However, these methods can simplify writing a lot of repetitive, basic HTML markup. The methods run on the server, but they are also lightweight. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required