ASP.net MVC App. Visual Studio 2022
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 html 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 reference from being generated in error?