Click here to Skip to main content
15,921,941 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: 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?
Updated 29-Apr-24 7:54am
Richard Deeming 30-Apr-24 7:29am    
That doesn't look like something generated by ASP.NET, and a search of the GitHub repo[^] doesn't turn up any relevant results.

Try using a different browser, or starting your browser in "safe mode" with all extensions disabled.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900