这是适用于localhost的代码。
观看通知/ Index.cshtml:
@using(Html.BeginForm("Index","Notification",FormMethod.Post))
{
...
但它不适用于服务器。 当我点击提交按钮时,这是网址。
http://test.com/Notification
我想要这个网址。
http://test.com/subfolder/Notification
它有子文件夹,因为我在服务器上使用了docker。
答案 0 :(得分:0)
试试这个:
Html.BeginForm("Index", "Notification", new {area="subfolder"}, FormMethod.Post)
但我建议您使用TagHelpers重写代码。