[英]ASP.NET core - How to href to an html/cshtml page from a button inside another html/cshtml
I need to access an html page "Pages\/createCampaign.html" and\/or "Pages\/addCampaign.cshtml" and\/or "wwwroot\/html\/insertCampaign.html" (I've created more as tests, but none seems to be working) from a click on a button inside "Pages\/Index.cshtml".我需要访问一个 html 页面“Pages\/createCampaign.html”和\/或“Pages\/addCampaign.cshtml”和\/或“wwwroot\/html\/insertCampaign.html”(我创建了更多作为测试,但似乎没有工作)通过单击“Pages\/Index.cshtml”内的按钮。
Inside html.cshtml:在 html.cshtml 内部:
<button type="button" class="create_but">
<a href="../Pages/createCampaign.html">
Create Campaign
</a>
I've read everything I found about static files and web root.我已经阅读了有关静态文件和 Web 根目录的所有内容。 Without specifying the file type from Index.cshtml I'm able to find addCampaign.cshtml like this:如果不从 Index.cshtml 指定文件类型,我可以像这样找到 addCampaign.cshtml:
<a href="~/addCampaign">
Create Campaign
</a>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.