Asp.net MVC renders 2 "form action" statements for the same form when in responsive mode
ASP.Net MVC VS 2022 Windows 11
App runs fine in desktop mode.
This line:
<@using (@Html.BeginForm("SubmitForm", "Home", FormMethod.Post, new { id = "subform", verify = "Y" }))>
is generated correctly as:
<form action="/Home/SubmitForm" id="subform" method="post" verify="Y">
when I inspect the page.
However, if I try to emulate a cell phone, the generated cshtml is:
<form action="/Home/SubmitForm" id="subform" method="post">
<form action="javascript:submitform()" method="POST" style="display:none;visibility:hidden;">
There is no javascript function called "submitform" so of course it fails.
What I have tried:
I did add an empty "submitform" function but that did not solve the issue.
How do I stop this javascript form action statement from being generated at all?