I’m just starting out in ASP.NET MVC (and web applications in general, as I’ve only really worked on console apps before), and was wondering how to display a link instead of a button for submitting a form?
Thanks.
I’m just starting out in ASP.NET MVC (and web applications in general, as I’ve
Share
<a href="#" onclick="document.forms[0].submit()">Please don't right-click, shift-click, ctrl-click or middle-click this link, or do anything else that seems like an obvious thing to do with links beyond just clicking it, as it's a dummy link pretending to be a submit button</a>Given the issues of people treating links like links (crazy of them, I know) it may be better to do
<span onclick="document.forms[0].submit()">Submit!</span>and then use CSS to give it a pointer cursor.