InterviewSolution
| 1. |
What is PartialView |
|
Answer» when we want a certain code to be used at some other view, we use a partial view. In simple words we can SAY that it is a child view which can be used in some other views, it prevents the duplicate of code since it used the same partial view at some other places When we want a partial view to be used on multiple controllers then we need to create a shared folder in the solution, OTHERWISE, if it using in a single controller then it doesn`t need it. Using Partial() or RenderPartial() or RenderAction() helper method .we can render the partial view content in its parent view @Html.Partial() helper method renders the specified partial view. It returns HTML STRING so we have a chance of MODIFYING the HTML before rendering. The different types of overloads used in partial views are:
|
|