Learn HTML output while debugging MVC views

Is there a way to see what HTML MVC Razor View has already created when navigating through it using a debugger?

For example, in a view, for example, the following:

...
@Html.Raw(someString)
@Html.Partial("_SomeCommonComponent")    
@Html.Raw(someOtherString)  <---------- Execution broken at breakpoint here
...

Is it possible to see the combined output of only the first call to "Raw" and a partial view?

The reason I ask is because I have several complex calls together (some of them do not produce any output), and one of them inserts the wrong characters, and I would like to know which call is the culprit stepping the code to until the wrong character is displayed.

+4
source share
1 answer

Visual Studio , Html.Raw(somestring) Html.Partial( "_CommonComponent" ). HTML .

ViewContext.Writer .

+1

Source: https://habr.com/ru/post/1568559/


All Articles