I'm writing a asp.net MVC site and I have written some extensions to the Html class to generate some html for me.
From within the extension method is it better to write directly to the Response.Output stream or have the extension method return a string?
What are the advantages / disadvantages of using the Reponse.Output stream directly from a View.
Usage example:
<%= Html.GenerateHtml() %>
vs.
<% Html.GenerateFoo() %>
From within the GenerateFoo() method I can writ directly to the output streem with the following
...
helper.ViewContext.HttpContext.Response.OutputStream.Write()
...