如何将现有的.html页面作为视图添加到mvc中的控制器 [英] how to add existing .html page as a view to controller in mvc

查看:266
本文介绍了如何将现有的.html页面作为视图添加到mvc中的控制器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想更改项目的GUI。我正在使用现成的bootstrap模板,因为我不是一个好的设计师。我有自己的后端代码,但我喜欢这些模板中的一些.html页面。我无法将其添加为该控制器的视图。

解决方案

将文件的扩展名更改为cshtml,然后根据需要添加相关的剃刀代码。

I want to change the GUI of my project. I am using ready-made bootstrap templates as I am not a good designer. I have my own back-end code but I like some .html pages from those template. I am not able to add it as a view to that controller.

解决方案

Change the extension of the file to cshtml then add the relevant razor code as needed.


这篇关于如何将现有的.html页面作为视图添加到mvc中的控制器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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