html 转换为cshtml,使用Html而不是csHtml
我想使用純HTML頁(yè)面而不是使用MVC .net的cshtml . 但是當(dāng)我通過(guò)右鍵單擊索引添加視圖時(shí),我只能看到兩個(gè)選項(xiàng) .
public class HomeController : Controller
{
//
// GET: /Home/
public ActionResult Index()
{
return View();
}}
Cshtml(剃刀)
Aspx
論壇但仍無(wú)濟(jì)于事 . 我仍然沒(méi)有看到添加html而不是cshtml的選項(xiàng)
我也嘗試直接添加html頁(yè)面到視圖文件夾,但我不知道如何從我的控制器功能指向該視圖 .
用Index.html替換Index.cshtml給了我這個(gè)錯(cuò)誤
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
總結(jié)
以上是生活随笔為你收集整理的html 转换为cshtml,使用Html而不是csHtml的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: [转载].SSRAM、SDRAM和Fla
- 下一篇: oracle 创建自增列及其oracle