nNote The syntax surrounding Html.RenderPartial() is a little different from that surrounding
most other HTML helpers. Look closely, and you’ll see that it’s surrounded with <% ...; %> rather than
<%= ... %>. The difference is that Html.RenderPartial() doesn’t return an HTML string, as most other
HTML helpers do. Instead, it emits text directly to the response stream, so it’s a complete line of C# code
rather than a C# expression to be evaluated. That’s because it might in theory be used to produce giant
amounts of data, and it wouldn’t be efficient to buffer all that data in memory as a string.
阅读(677) | 评论(0) | 转发(0) |