如何从index.html文件中调用.cshtml视图文件? [英] How to call .cshtml view file from index.html file?

查看:80
本文介绍了如何从index.html文件中调用.cshtml视图文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 Hello All,

我有一个MV Studio MVC项目。 运行良好。我创建了一个根页,即Index.html。我想调用 View / Account / Login.cshtml页面来自 Index.html页面。

以下屏幕截图包含项目和错误视图:
http: // my .jetscreenshot.com / 29065/20161202-ysmx-69kb

http: // my.jetscreenshot.com/29065/20161202-lphy-32kb

http: // my.jetscreenshot.com/29065/20161202-td1k-159kb

http: // my.jetscreenshot.com/29065/20161202-3pxa-145kb


回复我 if 任何人都可以很好地解决问题。

谢谢。





我尝试过:



我尝试过以下选项:
< a href = < span class =code-string>〜/ Controllers / Account / Login>记录 < ; / a >
< a href = 〜/ Controllers / Account / Login>在 > < / a >

解决方案

尝试使用controllername / actioname



 <   a     href   =  /帐户/登录 > 主页<   / a  >  


Hello All,

I have an MV Studio MVC Project. It is running well. I have created one root page namely, Index.html. I would like to call "View/Account/Login.cshtml" page from "Index.html" page.

The following screenshots have project and error view:
http://my.jetscreenshot.com/29065/20161202-ysmx-69kb

http://my.jetscreenshot.com/29065/20161202-lphy-32kb

http://my.jetscreenshot.com/29065/20161202-td1k-159kb

http://my.jetscreenshot.com/29065/20161202-3pxa-145kb


Reply me if anyone has a good solution to an issue.

Thanks.



What I have tried:

I have tried below options:
<a href="~/Controllers/Account/Login">Log in</a>
<a href="~/Controllers/Account/Login">Log in</a>

解决方案

try with controllername/actioname

<a href="/Account/Login">Home</a>


这篇关于如何从index.html文件中调用.cshtml视图文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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