janjongboom/Moth — Issue #7: Mvc2: Writer on ViewContext is not always HtmltextWriter
Author: Teun
Created: 2011-11-29 10:20:52+00:00
State: open

In my website, for some reason (not sure why), the Writer on the ViewContext has different types. Sometimes it's an HttpWriter, sometimes a StreamWriter and sometimes the HtmlTextWriter that Moth expects. This happens in perfectly normal pages with a Master page and.ascx partial views. All of the 3 types have been observed in the same partial view (but on different pages).

The whole implementation of the InlineScriptHelper seems a bit hackish. I'm not sure what would make a better way, but this does not seem to work for every Mvc2 page.