The question
I've read several posts on the net about there being no real difference between a partial view and a regular view in ASP.NET MVC, only that the convention of using them was different. Is this really the case?

I decided to find out the details for myself as part of the new "MVC for Web Forms Developers" course I'm working on for pluralsight.com so I could see exactly what all this entailed outside of just being a convention difference. Let it be known, there is indeed several differences you should be aware of. This post isn't meant to state when you should use one vs the other, there are plenty of resources for that. Here we just want to delve into how they are different, which in turn can help you decide when to use a View vs PartialView (and to confuse things more the decision there is really View vs PartialView vs Html.Action vs Html.Partial vs Ajax in any combination)
The differences
The differences that were obvious from the code are
- Partial Views don't have a layout processed. Very important to know.
- Partial Views don't check for a _ViewStart.cshtml. Note this is typically where layouts are specified but technically you could specify one in your partial and it would be ignored. Very important to know.
- Partial Views can throw a slightly different exception, the details included to InvalidOperationException in PartialViewResult vs ViewResult classes. This is pretty minor.
There is a slight difference in how they are processed.
Lets look at the code, shall we?
First, the differences between a PartialViewResult and a ViewResult as contained in the following files from the MVC source code:
- c:\source\aspnetwebstack\src\System.Web.Mvc\PartialViewResult.cs (link to source here)
- c:\source\aspnetwebstack\src\System.Web.Mvc\ViewResult.cs (link to source here)
Lets dive into FindPartialView and FindView. These are the functions called when you "return View()" and "return Partial()" from inside a controller.
The comparison of PartialViewResult and ViewResult
First check out a comparison side by side, this may give you an easy quick view with one of the best tools of all time,Beyond Compare
The codez
public virtual ViewEngineResult FindPartialView(ControllerContext controllerContext, string partialViewName, bool useCache) { if (controllerContext == null) { throw new ArgumentNullException("controllerContext"); } if (String.IsNullOrEmpty(partialViewName)) { throw new ArgumentException(MvcResources.Common_NullOrEmpty, "partialViewName"); } string[] searched; string controllerName = controllerContext.RouteData.GetRequiredString("controller"); string partialPath = GetPath(controllerContext, PartialViewLocationFormats, AreaPartialViewLocationFormats, "PartialViewLocationFormats", partialViewName, controllerName, CacheKeyPrefixPartial, useCache, out searched); if (String.IsNullOrEmpty(partialPath)) { return new ViewEngineResult(searched); } //********* note the call here to CreatePartialView ***** return new ViewEngineResult(CreatePartialView(controllerContext, partialPath), this); } public virtual ViewEngineResult FindView(ControllerContext controllerContext, string viewName, string masterName, bool useCache) { if (controllerContext == null) { throw new ArgumentNullException("controllerContext"); } if (String.IsNullOrEmpty(viewName)) { throw new ArgumentException(MvcResources.Common_NullOrEmpty, "viewName"); } string[] viewLocationsSearched; string[] masterLocationsSearched; string controllerName = controllerContext.RouteData.GetRequiredString("controller"); string viewPath = GetPath(controllerContext, ViewLocationFormats, AreaViewLocationFormats, "ViewLocationFormats", viewName, controllerName, CacheKeyPrefixView, useCache, out viewLocationsSearched); string masterPath = GetPath(controllerContext, MasterLocationFormats, AreaMasterLocationFormats, "MasterLocationFormats", masterName, controllerName, CacheKeyPrefixMaster, useCache, out masterLocationsSearched); if (String.IsNullOrEmpty(viewPath) || (String.IsNullOrEmpty(masterPath) && !String.IsNullOrEmpty(masterName))) { return new ViewEngineResult(viewLocationsSearched.Union(masterLocationsSearched)); } //********* note the call here to CreateView ***** return new ViewEngineResult(CreateView(controllerContext, viewPath, masterPath), this); }
The differences in view processing
The function calls below to create a partial view or a regular view do indeed differ. One has a pipeline that uses a layout, the other doesn't. The regular view processing uses viewstart pages as well. For those unfamilar with the viewstart file, this is a file MVC looks for since MVC3.
MVC will look in the /Views/Shared folder and in the current view folder as well for a file named _ViewStart.cshtml. This file contains code that will be executed before the view is processed, typically it's used to store the path to the layout in it and again, can be set for all views or overridden in a particular views folder, ex /Views/Customer/_ViewStart.cshtml to set a different Layout for views in that folder as one example.
@{ Layout = "~/Views/Shared/_MasterPage.cshtml"; }
protected override IView CreatePartialView(ControllerContext controllerContext, string partialPath) { //**NOTE a partial view has a null layout and runViewStartPages is false! ** return new RazorView(controllerContext, partialPath, layoutPath: null, runViewStartPages: false, viewStartFileExtensions: FileExtensions, viewPageActivator: ViewPageActivator) { DisplayModeProvider = DisplayModeProvider }; } protected override IView CreateView(ControllerContext controllerContext, string viewPath, string masterPath) { //note the usage of a masterPath below. var view = new RazorView(controllerContext, viewPath, layoutPath: masterPath, runViewStartPages: true, viewStartFileExtensions: FileExtensions, viewPageActivator: ViewPageActivator) { DisplayModeProvider = DisplayModeProvider }; return view; }
In closing
So there are some differences as probably expected. Nothing groundbreaking but it is important to understand the shortcut pipeline the PartialView takes hence making them perform a bit better as well. Ok, now you know the exact differences and have seen it from the source, in other words - heard it from

Enjoy!
More informative subject.model view controller(MVC) is a framework for building web application and main part of asp.net. The Keshri Software Solutions provides Web Application development,Website Promotions, Search Engine Optimizations services . We have a very dedicated and hard working team of web application developers(asp.net/c#/sql server/MVC) , Search engine optimizers. Fast communication and quality delivery product is our commitment.
ReplyDeleteTo get more details please log on to - http://www.ksoftware.co.in .
ReplyDeleteThis is nice information,, Thanks for sharing this information,, Its very useful to me
software development
The article was awesomely described here by the author. I really enjoyed reading interesting post from this blog.
ReplyDeleteSoftware Development Company in Indore
Thanks for sharing it. Anar .NET Solutions
ReplyDeleteThis page is very beautiful.
ReplyDeletehttp://katagombal.weebly.com/
Thank you for sharing helpful information.
ReplyDeleteonline training
online software training
online business training inistitute
online marketing training institute
online music training
online designing training
online languages training
This comment has been removed by the author.
ReplyDeletepantun cinta
Deletekata mutiara
kata bijak
Informative and helpful post you have shared.
ReplyDeleteeCommerce website development in Chennai
Java Training InstitutesJava Training Institutes Java Training in Chennai | Java Training in Chennai | Dot Net Training in Chennai JavaScript Training in CHennai JavaScript Training in CHennai | | Single Page Application Development
ReplyDeletekata bijak
ReplyDeletepantun jenaka
puisi cinta
Thanks for writing in such an encouraging post. I had a glimpse of it and couldn’t stop reading till I finished. I have already bookmarked you. hotel management colleges in punjab
ReplyDeleteSuch a nice blog posting
ReplyDeleteMobile App Development Company Indore
شركة تسليك مجاري المطبخ بالرياض
ReplyDeleteشركة تسليك مجاري بالرياض
شركة تسليك مجارى الحمام بالرياض
level تسليك المجاري بالرياض
افضل شركة تنظيف بالرياض
تنظيف شقق بالرياض
شركة تنظيف منازل بالرياض
شركة غسيل خزنات بالرياض
افضل شركة مكافحة حشرات بالرياض
رش مبيدات بالرياض
شركة تخزين عفش بالرياض
شركة تنظيف مجالس بالرياض
تنظيف فلل بالرياض
ابى شركة تنظيف بالرياض
Titan Gel Asli
ReplyDeleteVimax Asli Canada
Cobra Oil Super
Vmenplus Asli
Obat Kuat Viagra
Nangen Zengzhangsu
Maximum Powerfull
Potenzol Cair Asli
Perangsang Serbuk
For Razor users, both regular and partial views are cshtml files. There is no actual difference between them.
ReplyDeleteWeb development company in Indore
I am very glad to read your blog post it’s very useful for everyone. I am completely satisfied with your blog.
ReplyDeleteE-commerce web Design Company in India
We welcome to Exoticdelhiescorts provide you with a hot Hyderabad model or girl that you can make love in Hyderabad.
ReplyDeletehttp://www.exoticdelhiescorts.in/call-girls-hyderabad.html
This is detailed and excellent information. Your blog is like professional! Do you want to find best premium wordpress templates for any kind of business? go here https://wordpresstemplates.ch/
ReplyDeleteReally great blog, it's very helpful and has great knowledgeable information. Thanks for sharing, keep updating such a good informative blog.
ReplyDeleteDigital Transformation Services | Austere Technologies
VERY INFORMATIVE BLOG. KEEP SHARING SUCH A GOOD ARTICLES.
ReplyDeletecloud Services | Austere Technologies
Really great blog, it's very helpful and has great knowledgeable information. Thanks for sharing, keep updating such a good informative blog.
ReplyDeleteBest Software Company | Austere Technologies
Very good informative article. Thanks for sharing such nice article, keep on up dating such good articles.
ReplyDeleteIOT SERVICES | INTERNET OF THINGS | Austere Technologies
Nice blog with excellent information. Thank you, keep sharing.
ReplyDeleteSoftware Security Services | Austere Technologies
This is really great informative blog. Keep sharing.
ReplyDeleteBest Quality Managment Services | Austere Technologies
Drivers for all kinds of devices: https://huaweidrivers.com/
ReplyDeleteLooking great article, contains very useful information. Thanks much for sharing and please do keep on sharing...
ReplyDeleteBest Online Software Training Institute | Asp.Net MVC Training
http://riyadatta.com/
ReplyDeleteHyderabad Call Girls Service
Independent Call Girls Hyderabad
Escorts Service in Hyderabad
Call Girls in Hyderabad
Hyderabad Escorts
Hyderabad Escort Service
Escorts in Hyderabad
Hyderabad Call Girls
Female Escort in Hyderabad
I am thankful to this blog for assisting me. I added some specified clues which are really important for me to use them in my writing skill. Really helpful stuff made by this blog.
ReplyDeleteทํา สติ๊กเกอร์ สินค้า
Thanks for sharing this post.
ReplyDeleteBangalore escorts
Escorts Service Bangalore
Bangalore escorts locations
Independent Bangalore Escorts
Bangalore Escorts Service
High Class Escorts Bangalore Video
Sarai Kale Khan Escorts Service Girls
ReplyDeleteSarita Vihar Escorts Service Girls
Sarojini Nagar Escorts Service Girls
Satya Niketan Escorts Service Girls
South Ex Escorts Service Girls
Sunder Nagar Escorts Service Girls
Tilak Nagar Escorts Service Girls
Uttam Nagar Escorts Service Girls
Vasant Kunj Escorts Service Girls
Vasant Vihar Escorts Service Girls
Vikaspuri Escorts Service Girls
ReplyDeleteMukherjee Nagar Escorts Service Girls
Chattarpur Escorts Service Girls
Laxmi Nagar Escorts Service Girls
Nizamuddin Escorts Service Girls
Aerocity Escorts Service Girls
Lodhi Road Escorts Service Girls
Safdarjung Enclave Escorts Service Girls
Aya Nagar Escorts Service Girls
Ghitorni Escorts Service Girls
Chhatarpur Escorts Service Girls
ReplyDeleteRk Puram Escorts Service Girls
Tughlaqabad Escorts Service Girls
Govindpuri Escorts Service Girls
Chandni Chowk Escorts Service Girls
Anand Vihar Escorts Service Girls
Dilshad Garden Escorts Service Girls
New Ashok Nagar Escorts Service Girls
Shahdara Escorts Service Girls
Vinod Nagar Escorts Service Girls
Hi Thanks for the nice information its very useful to read your blog. We provide best Block Chain Services
ReplyDeleteHi Thanks for the nice information its very useful to read your blog. We provide best System Integration Services
ReplyDeleteHi Thanks for the nice information its very useful to read your blog. We provide best company secretary course
ReplyDeleteHi Thanks for the nice information its very useful to read your blog. We provide best Chartered Accountancy
ReplyDeleteHi Thanks for the nice information its very useful to read your blog. We provide best Certified Public Accountant
ReplyDeleteHi Thanks for the nice information its very useful to read your blog. We provide best Certified Financial Analyst
ReplyDeleteThank you for sharing this valuable information. But get out this busy life and find some peace with a beautiful trip. book ANDAMAN TOUR PACKAGE @24599
ReplyDeleteThank you for sharing this valuable information. But get out this busy life and find some peace with a beautiful trip. book BEST ANDAMAN HONEYMOON PACKAGE @5999
ReplyDeleteHi Thanks for the nice information its very useful to read your blog. We provide Software Development Services
ReplyDeleteHi Thanks for the nice information its very useful to read your blog. We provide best Chartered Institute Of Management Accountants
ReplyDeleteWomen and young women see the world specific way. They both have substitute point of view in understanding the world in an unexpected way. Furthermore, they interface with everybody shockingly. Young women are twelve, yet women are a need.
ReplyDeletegoa escort
Thanks for sharing this with so much of detailed information, its much more to learn from your article. Keep sharing such good stuff.
ReplyDeleteVIVO Mobile Service Center in Coimbatore
Sony Mobile Service Center in Coimbatore
Hello there every person, my name is Gina, I am an independent call girl in Jaipur, I am offered 24/7 as well as my rates begins with Rs. 3000 only. our site
ReplyDeleteGirls in South Delhi are well-renowned across India for their open mind and also stylish personality. Friendly, well-read and also fashionable, the South Delhi ladies are the ideal business for your leisure time, at your certain event Delhi Escort
ReplyDeleteExcellent informative blog, keep for sharing.
ReplyDeleteBest System Integration services | Massil Technologies
Thanks for posting this info. I just want to let you know that I just check out your site and I find it very interesting and informative. I can't wait to read lots of your posts.
ReplyDeleteTekSlate Online Training's
awesome post presented by you..your writing style is fabulous and keep update with your blogs.
ReplyDeletetop web designing companies in hyderabad
web designers in hyderabad
best website designing company in Hyderabad
Are you looking for escort advantage in Delhi, we give the best that would absolutely change your experience. Our escorts are arranged precisely to pass on best organization that you are scanning for.
ReplyDeleteDelhi Escorts
nice info...
ReplyDeleteThank you for sharing
Brolly- Training and marketing services | Digital marketing course with internship
Thanks for sharing the useful content please do keep on sharing…
ReplyDeleteSoftware Training courses in hyderabad | HTML course
ReplyDeleteWell said!! much impressed by reading your article. Keep writing more.
Software testing training in chennai
Salesforce Training in Chennai
Big Data Training in Chennai
Hadoop Training in Chennai
Android Training in Chennai
Selenium Training in Chennai
Digital Marketing Training in Chennai
JAVA Training in Chennai
Best JAVA Training institute in Chennai
Hey, very nice site. I came across this on Google, and I am stoked that I did. I will definitely be coming back here more often. Wish I could add to the conversation and bring a bit more to the table, but am just taking in as much info as I can at the moment. Thanks for sharing.
ReplyDeleteDai Software
The Post which you wrote is full of informative and vital blogs. I like it very much. Thank you for your work.
ReplyDeleteAngularJS Training in Chennai
AngularJS course in Chennai
AngularJS Training institute in Chennai
German Classes in Chennai
German Language Classes in Chennai
German Certification in Chennai
Very good to read thanks for sharing
ReplyDeletesalesforce training institute chennai
Avast customer service
ReplyDeletemcafee support number
apple customer care phone number
itunes contact number uk
The eye-getting self-regulating escorts in Goa perceive how to make indisputably the most goal and to an extraordinary Goa Escorts degree key minutes for the clients. On the off chance that a man needing to get an entire night with Goa escort, atthat point he would be a head among the most respected men. The contact females inGoaare intriguing, eye-getting and unimaginable from each perspective
ReplyDeleteThank you for your post. This is excellent information.
ReplyDeleteCEH Training In Hyderbad
I really appreciate your efforts. I found this article quite interesting and informative especially the quality of content that I have read here really inspire me. I have found another blog for the same quality content
ReplyDeleteDigital Marketing in Bhopal
Everybody has to take the services of a girl like Vida, when the company may be available for every girl of her time, which is also found in the Bangalore City May, which will serve you. Plz you can visit to Mg.Road , Bangalore and the direct call to me : 7022789089
ReplyDeletehttps://www.payalpandya.com
bangalore escorts
escorts in Bangalore
bangalore escorts service
bangalore escorts agency
escort service in bangalore
bangalore escort girls
escorts service bangalore
Pune Escorts
ReplyDeletePune Escorts
Ahmedabad Escorts
Ajmer Escorts
Delhi Escorts
Hyderabad Escorts
Kolkata Escorts
Mumbai Escorts
Bangalore Escorts
Nice post, very useful blogs with very useful information, thank you for sharing this post web application development company
ReplyDeleteEverything is very open with a very clear clarification of the issues. It was truly informative. Your website is useful. Many thanks for sharing! Take a look also at web development and web development company
ReplyDeleteA befuddling web diary I visit this blog, it's incredibly grand. Strangely, in this present blog's substance made motivation behind fact and sensible. The substance of information is instructive
ReplyDeleteOracle Fusion Financials Online Training
Oracle Fusion HCM Online Training
Oracle Fusion SCM Online Training
Thanks for providing a useful article containing valuable information. start learning the best online software courses.
ReplyDeleteWorkday Online Training
Only one out of every odd female escort for social event in Hyderabad offer their butt for some butt-driven, so guarantee before the get-together comes that everything has been shown all together for both of you to appreciate.
ReplyDeleteHyderabad Escorts
Independent Call Girl in Hyderabad
Good post..Keep on sharing....
ReplyDeleteGCP Training
Google Cloud Platform Training
GCP Online Training
Google Cloud Platform Training In Hyderabad
good Post Really its informative and thanks for sharing with us
ReplyDeleteSarkari Naukri UP Government
Sarkari Jobs 12th Pass
Jobs in Assam
Superlative efficient Goa escort organizations offer a wide scope of selective administrations from a high social class. These closeness can made everything from giving you an accomplice for a conference, most prominent undertakings travel visits. Would you like to make the most of your get-away? Take a journey with an attractive lady or simply appreciate a night around the city
ReplyDeleteGoa Escorts
This is really great informative blog. Keep sharing.
ReplyDelete.Net Training In Ahmedabad
Live Project Training in .Net
hello reshab here please follow our link for all vip escorts in bangalore complete details best escort service in bangalore
ReplyDeletebest escort service in bangalore
escort service in bangalore
escort in bangalore
escort bangalore
bangalore escort
Hey Really Thanks for sharing the best information regarding oracle,hope you will write more great blogs.
ReplyDeleteWorkday Online Training
An overwhelming web journal I visit this blog, it's unfathomably amazing. Unusually, in this present blog's substance made inspiration driving truth and reasonable. The substance of data is enlightening
ReplyDeleteOracle Fusion Financials Online Training
Oracle Fusion HCM Online Training
Oracle Fusion SCM Online Training
https://n4g.com/user/score/nothingstopusnow
ReplyDeletehttps://dergipark.gov.tr/@andybern
https://www.bookcrossing.com/mybookshelf/tattoosboygirl?
http://profile.cheezburger.com/tattoosboygirl/
http://twubs.com/tattoosboygirl
https://topibestlist.com/
https://n4g.com/user/score/nothingstopusnow
ReplyDeletehttps://dergipark.org.tr/@andybern
https://www.bookcrossing.com/mybookshelf/tattoosboygirl?
http://profile.cheezburger.com/tattoosboygirl/
http://twubs.com/tattoosboygirl
https://topibestlist.com/
This is a nice article here with some useful tips for those who are not used-to comment that frequently. Thanks for this helpful information I agree with all points you have given to us. I will follow all of them.
ReplyDeleteapache spark online training
Trucking Cube Provide Freight Charges, Lorry hires Bulk Transport, Cheapest Truck Rental Company, Hire a Truck, etc. If you want this kind of services at an affordable cost then contact Trucking Cube.
ReplyDeleteInternational Freight Forwarders
Truck Hire
Budget Moving Truck
Awesome! Thanks for sharing such beautiful information with us. I trust you will share some more new ideas about this topic. Please keep sharing!
ReplyDeleteSpark Training in Chennai
Spark Training Academy
Oracle Training in Chennai
Soft Skills Training in Chennai
JMeter Training in Chennai
Tableau Training in Chennai
Unix Training in Chennai
Social Media Marketing Courses in Chennai
Spark Training in Thiruvanmiyur
Spark Training in Tambaram
This is an awesome post.Really very informative and creative contents. These concept is a good way to enhance the knowledge.I like it and help me to development very well.Thank you for this brief explanation and very nice information.Well, got a good knowledge.
ReplyDeletejava training in Bangalore