The primary difference is that a Partial View is designed to be rendered within other full Views and as a result it will not contain all of the markup that a full View might ( since it is designed to work within other Views ). For example, a normal View might look like this and contain all of the elements present in a traditional HTML page : <!DOCTYPE html> <html> <head> <meta charset = utf-8 /> <title> Example </title> </head> <body> <!-- Your Content Here --> </body> </html> where as a Partial View might only contain a small section that it needs to render and since it should be displayed within an existing View, it won't require the necessary tags like <head>, <html>, etc. because it is implied that these should already be present when a Partial View is rendered. An example partial View might look like this : <div> <!-- Example --> <ul> ...
Comments
Post a Comment