【发布时间】:2017-10-11 02:38:47
【问题描述】:
我正在尝试在我的 ASP.NET CORE 的视图页面中创建一个按钮。
当用户单击该按钮时,解决方案中存在的 pdf 文件(sln) 应该下载给用户。
I tried a href="location" inside button
<a href="location" target="blank">download</a>
它不工作。
还有其他方法吗?
请帮帮我。
提前致谢。
【问题讨论】:
-
你使用的是 webforms 还是 mvc?
-
您究竟使用了什么作为“位置”,例如哪个文件名?
-
ASP.NET CORE@GeorgeWurthmann 和 @Moriarity 在我的 mvc 文件名 PDF.cshtml 中查看页面
标签: c# html pdf asp.net-core