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 partial view by using
@Html.Partial("ViewName")
or by specifying that its action return it as
return PartialView();
Ive noticed that the opposite is also the case - ie, one can create a partial view but if it is returned as a full view, it will be displayed with the default layout for the views.
My question is this - When adding a new view in Visual Studio, one is given the option of creating a view that is partial or not. Isn't this redundant, since a view can be rendered as both a partial and a full view anyway?
Quite late but might be useful for someone with the same question. Partial views are helpful in a scenario where you want to load a view based on some user selection.
For instance, let's assume there is a dropdown in parent view displaying three operations that the user can perform. Based on the user selection, a partial view can be loaded into the parent view instead of keeping hidden DIVs in the parent view itself, thus making the parent view light. This will be very useful when we have multiple such user selections based DIVs
To answer your question specifically, when adding a new view in Visual Studio, you will get some very basic markup generated for you as a starting point, based off of your selections in the dialog.
Here is the generated markup in Visual Studio 2010 (VB.NET) for the different combinations of the "Partial" checkbox and the "Layout" checkbox:
As you can see there is nothing fancy going on in the background or special properties being set in a secret file somewhere. The options are simply used to get some default markup on the page. Whether or not this is practical is purely subjective!