当我有Layout = null的时候,在我看来 – 它仍然拉入默认布局?
有没有一些技巧来阻止它这样做?
这里是我的视图没有布局:
@{ Layout = ""; } <!DOCTYPE html> <html> <head> <title>Index</title> @{Html.RenderAction("Head","Header");} </head> <body> <div> Home </div> </body> </html>
这里是渲染的输出!
<!DOCTYPE html> <html> <head> <title>Index</title> <!DOCTYPE html> <html> <head> <Meta charset="utf-8" /> <title></title> <link href="/Content/Site.css" rel="stylesheet" type="text/css" /> <script src="/Scripts/jquery-1.5.1.min.js" type="text/javascript"></script> <script src="/Scripts/modernizr-1.7.min.js" type="text/javascript"></script> </head> <body> header </body> </html> </head> <body> <div> Home </div> </body> </html>