Is it bad practice to set the layout of an MVC view to null
?
@{
Layout = null;
}
<!DOCTYPE html>
<html>
<head>
</head>
<body>
// Some Content
</body>
</html>
By 'bad practice', I mean is anybody aware of inner-components of the MVC rendering engine that depend on a layout to be an instance of an object? Or is this a fine approach to specifying 'no layout'?
To Confirm
This approach works and gives me the result I'm after, I'm asking whether I could inadvertently cause headaches elsewhere in the system.
Apologies, I should've clarified - I am leveraging _ViewStart to set the layout, so this serves as an override (probably missed a key bit of the question out there sorry!)