views:

30

answers:

1

Is it possible to say something to the effect of 'SomeClass.Out.WriteLine("hello world")' and have it actually show up for the browser to render? I ask, because I notice that the HtmlHelper BeginForm implements IDisposible. So at the end of the using block, a closing tag is written to the browser.

I am not saying I would use this practice, as it seems like a bad idea, but I just want a better understanding of what is going on under the hood of C# ASP MVC.

Thanks

+1  A: 

Response.Write() or Response.Output.Write(). The second gives you the possibility to format the string, likewise to the string.Format() method.

Femaref
Thank you very much. This was the answer I sought.