I'm writing an html helper extension for MVC5. I need to access the ViewContext's stream to edit it. (like a textreader)
htmlHelper.ViewContext.Writer.Write("<div>");
Is there any way to access the stream; so that I can manipulate or add some html code above the last "div" tag in the example ?
I was not able to find any clue about at where I can find the stream that textwriter writes to?