What is the point of Partial Views in Asp.net MVC

后端 未结 8 1947
北恋
北恋 2020-12-30 00:49

Ive noticed that there seems to be no real difference between a view and a partial view. For instance, one can create a view but can render it as a

8条回答
  •  萌比男神i
    2020-12-30 01:19

    Partial view kept to use as partial page of the main page(parent page).
    What does mean of partial view? Actually in the main page we will have all the HTML page attributes as below:
    html lang="en"
    head
    title
    meta
    body

    But in partial view we will not have all above attributes.

    Find the features of partial page:
    1. Partial page will be light wait and get fitted into the any view.
    2. This will use as the reusable component.
    3. Partial view will be render inside of a View(parent view or page).

    For all who coming from ASP.Net background they can understand partial view as user control.

    Thanks Afazal mdafazal@gmail.com

提交回复
热议问题