html 转换为cshtml,使用Html而不是csHtml
2023-06-13 09:12:23 时间
大家好,又见面了,我是你们的朋友全栈君。
我想使用纯HTML页面而不是使用MVC .net的cshtml . 但是当我通过右键单击索引添加视图时,我只能看到两个选项 .
public class HomeController : Controller
{
//
// GET: /Home/
public ActionResult Index()
{
return View();
}}
Cshtml(剃刀)
Aspx
论坛但仍无济于事 . 我仍然没有看到添加html而不是cshtml的选项
我也尝试直接添加html页面到视图文件夹,但我不知道如何从我的控制器功能指向该视图 .
用Index.html替换Index.cshtml给了我这个错误
The view ‘Index’ or its master was not found or no view engine supports the searched locations. The following locations were searched:
~/Views/Home/Index.aspx
~/Views/Home/Index.ascx
~/Views/Shared/Index.aspx
~/Views/Shared/Index.ascx
~/Views/Home/Index.cshtml
~/Views/Home/Index.vbhtml
~/Views/Shared/Index.cshtml
~/Views/Shared/Index.vbhtml
发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/149797.html原文链接:https://javaforall.cn
相关文章
- python中如何把列表转换为字符串
- 图片下划线 html,HTML <U>下划线标签元素 HTML下划线标签「建议收藏」
- js 符号转换 html代码
- js数据转换为html,JavaScript怎么进行类型转换?「建议收藏」
- JS转换HTML转义符,防止javascript注入攻击,亲测可用「建议收藏」
- js把HTML转成对象,将js对象转换为html「建议收藏」
- jsp中<!DOCTYPE html PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN” 。。的重要性「建议收藏」
- Json字符串和对象相互转换
- 使用HTML连接MySQL数据库实现功能(html连接mysql数据库)
- Linux文本文件转换:简单实现跨格式数据传输(linux文本文件转换)
- USB转Linux:实现一键式无缝转换(usb转linux)
- 让Linux灵活运行HTML:简单有效的方法(linux运行html)
- 标签使用MySQL过滤HTML标签(mysql过滤html)
- MySQL转换大写的利器(mysql转大写)
- Oracle数据库中日期类型的转换及格式化方法(oracle转日期)
- HTML连接Oracle利用JavaScript即可实现(html连接oracle)
- Oracle中转换日期的新姿势(oracle中转日期)
- ubb代码转换为html
- asp下实现对HTML代码进行转换的函数
- C#实现HTML和UBB互相转换的方法
- Python转换HTML到Text纯文本的方法