Glass.Mapper.Sc.IGlassHtml provides access to helper methods that can be used to rendering content easily in MVC Views and Web Form controls.

You might be asking why do you need a helper class to render content? In the exercises that you have completed you have not need to use one.

It is possible to render content without using IGlassHtml but if you want to take full advantage of the Experience Editor or save yourself time when rendering a field then you must use IGlassHtml. IGlassHtml provides the following featues:

Accessing from Sitecore MVC

When working with Sitecore MVC there are multiple ways to access the IGlassHtml helper.

The first method is via the IMvcContext interfaces:

The other way to access it, and the more common way is using the CSHTML helper method: