[RESOLVED]Partial View In Mvc?..

HI  Friends ,

                    At what situation Force us to use the Partial view .How to use that .Can  Anyone Explain in detatils with example .

Thanks in Advance ,

Karthik K


If you are familiar with WebForms, you can come across the word like "User Controls". In ASP.Net MVC, the same concept called as "Partial Views". With the help of partial views you can achieve the concept of Reusabililty.



There are two reasons to use partial views:

  1. Reusability. If your view have some part in common, you can separate that part out in a partial view and then call the partial view from the other views directly or via an actionmethod.
  2. Partial update of page. If you know that a certain part of your view will be changing a lot, you can separate this part into a partial view. Then if you use Ajax only this part of the page will be updated.

Hello Karthik,

  1. In a simple way partial views are used for reusable purpose.
  2. If you create a partial view in under views- particular view folder name, then you can use by that controller actions only.
  3. If you create a partial view in under views-> shared folder then it is global for all controllers.
  4. Another advantage by using Partial views you can update the partial view content by using an Ajax request.


Leave a Reply