剃刀布局从另一个组件 [英] Razor Layout from another assembly

查看:82
本文介绍了剃刀布局从另一个组件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有可能从另一个组件使用的布局?我吐尽了我在不同的层应用程序并包含总体布局为设计师们编辑分开的UI层。

这是可能的,什么我会参考样子?我

  @ {
    ViewBag.Title =指数;
    布局=〜/查看/共享/ _Layout.cshtml
}


解决方案

您可以看看的的下面这说明技术让你有剃刀的浏览量嵌入到一个单独的程序文章

Is it possible to use a layout from another assembly? I spitted up my application in different layers and have a separated UI layer which contains the master layout for the designers to edit.

Is it possible and what I what would my reference looks like?

@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

解决方案

You may take a look at the following article which illustrates a technique allowing you to have Razor views embedded into a separate assembly.

这篇关于剃刀布局从另一个组件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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