asp.net mvc在没有查看文件的情况下工作 [英] asp.net mvc working without view file
本文介绍了asp.net mvc在没有查看文件的情况下工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在asp.net mvc上有一个可插入的场景。我的布局文件包含头部和身体的方法。方法是渲染相关的插件。所以我只有一个Controller / Action(Page / Index),我不需要任何视图文件来执行此操作。没有View文件或只有Layout文件可以工作吗?
谢谢。
布局示例。< br $> b $ b
I have a plugable scenario on asp.net mvc. My Layout file contains a method for Head and body. Methods are rendering related plugin. So I have only one Controller/Action (Page/Index) and I dont need any view file for this action. Is that posible working without View file or only Layout file?
Thanks.
Layout example.
<html>
<head>
<title></title>
</head>
<body>
<div> MENU </div>
<div>
Plugin.Render("body"); //Render plugin method.
</div>
</body>
</html>
推荐答案
这篇关于asp.net mvc在没有查看文件的情况下工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文