![]() |
От: | skodnik | |
Дата: | 01.04.11 10:15 | ||
Оценка: |
Все равно разницу не уловил. Складывается впечатление, что это синтаксический сахар. Хочешь работать с моделью предметной области — бери RenderAction, хочешь работать с той же моделью что и страница контенейнер — бери RenderPartial.The RenderPartial is more similar to an "inclusion", it will even share the same model if you don't specify one. The RenderAction is much more complex (and there may be undesired side effects, that's why they put it into the futures).
![]() |
От: | deekey | |
Дата: | 01.04.11 19:33 | ||
Оценка: |
S>Все равно разницу не уловил. Складывается впечатление, что это синтаксический сахар. Хочешь работать с моделью предметной области — бери RenderAction, хочешь работать с той же моделью что и страница контенейнер — бери RenderPartial.S>The RenderPartial is more similar to an "inclusion"...
RenderPartial will render a View on the same controller (or a shared one), while RenderAction will ... instantiate the controller (any controller you mention, not the current one only), it will execute the action, and it will then return and render the result.