InterviewSolution
| 1. |
What Is The Difference Between "render" And "renderpartial" ? |
|
Answer» render() is commonly USED to render a view that corresponds to what a USER sees as a "page" in your application. It first renders the view you have specified and then renders the layout for the current controller action (if applicable), placing the result of the first render into the layout. It then performs output PROCESSING (which at this time means automatically inserting any necessary <script> tags and updating DYNAMIC content) and finally outputs the result. renderPartial() is commonly used to render a "piece" of a page/HTML. The main difference from render() is that this method does not place the results of the render in a layout. render() is commonly used to render a view that corresponds to what a user sees as a "page" in your application. It first renders the view you have specified and then renders the layout for the current controller action (if applicable), placing the result of the first render into the layout. It then performs output processing (which at this time means automatically inserting any necessary <script> tags and updating dynamic content) and finally outputs the result. renderPartial() is commonly used to render a "piece" of a page/HTML. The main difference from render() is that this method does not place the results of the render in a layout. |
|