Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get current generated html while debugging mvc3 view

While stepping through the generation of a View. Is there a way to see the HTML that has been generated to that point? I've tried looking through the locals variable list, but am having trouble finding it.

like image 842
Jared Avatar asked Jun 23 '26 09:06

Jared


1 Answers

You can look at the ViewContext.Writer. Try adding...

((System.Web.Mvc.WebViewPage)(this)).ViewContext.Writer

to your watch window.

like image 66
DaveMorganTexas Avatar answered Jun 25 '26 23:06

DaveMorganTexas



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!