什么替换MVC Razor Layout中的内容占位符 [英] What replacing the content placeholder in MVC Razor Layout

查看:113
本文介绍了什么替换MVC Razor Layout中的内容占位符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我已经开始学习MVC 4.我想知道如何在Razor Layout页面中添加多个内容部分,因为我们在母版页中做了。你能帮我吗?

解决方案

使用RenderSection



请点击以下链接



ASP.Net MVC 4 - Razor中的布局和部分

http://www.c-sharpcorner.com/UploadFile/3d39b4/Asp-Net-mvc-4-layout-and -section-in-razor / [ ^ ] [ ]

Hi,

I've started to learn MVC 4. I would like to know about how can I add multiple content part in a Razor Layout page as we did in Master page. Could you please help me.

解决方案

Use a RenderSection

Please go through below link

ASP.Net MVC 4 - Layout and Section in Razor
http://www.c-sharpcorner.com/UploadFile/3d39b4/Asp-Net-mvc-4-layout-and-section-in-razor/[^][]


这篇关于什么替换MVC Razor Layout中的内容占位符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆