1 Scenario: The MVC pattern developed by the. cshtml screen, there is a @if statement inside, if the statement inside there are other code, the screen always error: If the module does not correspond to the "}", what problem
After tracking, the decision CS Statement No problem, that is the screen JS error? At first, the idea was this.
Later, after careful check, found that if the statement of many},{} are paired appear
But I found a situation, that is, some if statement {} These two symbols, can correspond to each other, but some {} mouse select one, the other is not selected, then I will be the if the middle of all the statements are deleted, found that can correspond to each other, and then i a sentence of the network add, the problem finally found! It turns out that the comment statement in the. cshtml file, @if, cannot be annotated with <!----this way!!!
MVC Development Razor Mode considerations