System.Web.HttpException: The file "~/xxx//Index.cshtml" cannot be requested directly because it cal
2011-03-12 13:07
525 查看
刚开始用Razor的时候经常把RenderSection当作RenderPartial的替代品,其实它是ContentHolder的替代品。
Section的意图是在上级页面(原来的master)中建立一个空间,在子级页面中向其中根据需要填充内容。因此不能在被直接调用的子页面(如index)中直接写RenderSetion,而只能写@section。
因此直接访问带有RenderSection的页面,相当于直接调用master。
点击下载免费的敏捷开发教材:《火星人敏捷开发手册》
Section的意图是在上级页面(原来的master)中建立一个空间,在子级页面中向其中根据需要填充内容。因此不能在被直接调用的子页面(如index)中直接写RenderSetion,而只能写@section。
因此直接访问带有RenderSection的页面,相当于直接调用master。
点击下载免费的敏捷开发教材:《火星人敏捷开发手册》
相关文章推荐
- System.Web.HttpException: The file "~/xxx//Index.cshtml" cannot be requested directly because it cal
- System.Web.HttpException: The file "~/xxx//Index.cshtml" cannot be requested directly because it cal
- System.Web.HttpException: The file "~/xxx//Index.cshtml" cannot be requested directly because it cal
- System.Web.HttpException: The file "~/xxx//Index.cshtml" cannot be requested directly because it cal
- System.Web.HttpException: The file "~/xxx//Index.cshtml" cannot be requested directly because it cal
- Database 'xxx' cannot be upgraded because it is read-only or has read-only file Make the database or files writeable, and rerun recovery.
- java.io.FileNotFoundException: [WEB-INF/spring-servlet.xml] cannot be opened because it does not exist
- Could not load file or assembly "xxx" or one of its dependencies. The system cannot find the file sp
- iOS the file "xxx.app" couldn't be opened because you don't have permission to view it.
- maven构建 出错:cannot be resolved to absolute file path because it does not reside in the file system
- cannot be resolved to absolute file path because it does not reside in the file system : jar:file:/D
- java.io.FileNotFoundException: class path resource [WEB-INF/classes/cn/golaxy/yqpt/pojo/] cannot be resolved to URL because it
- iOS 报错:没有查看权限the file "xxx.app" couldn't be opened because you don't have permission to view it.
- the file "xxx.app" couldn't be opened because you don't have permission to view it.
- cannot be resolved to absolute file path because it does not reside in the file system
- cannot be resolved to absolute file path because it does not reside in the file system
- 【iOS问题】The file “XXX.app” couldn’t be opened because you don’t have permission to view it.
- 解决 "The absolute uri: xxx cannot be resolved in either web.xml or the jar files"
- "The object cannot be deleted because it was not found in the ObjectStateManager."
- 使用idea 标签库报"The absolute uri: xxx cannot be resolved in either web.xml or the jar files"