updating the page generator and base view to work with razor helper functions

@NTaylorMullen 
Follow same pattern as you have in `WriteTo`. Ex:

```C#
if (value != null)
{
    WriteLiteralTo(writer, value.ToString(CultureInfo.InvariantCulture));
}
```