How to handle HTTP POST with MVC when replacing input ["text"]

I'm looking for a good example that shows how to handle (in a controller) POST onchange (eg input ["text"])

Currently when I set my onchange = form [0] .submit (); and I watch the action hit the controller, the HTTP verb is still GET for some odd reason. But when I view the source, the form on the page has a = "POST" method ... so what am I doing wrong?

+1


a source to share


2 answers


Can you use the ajax library (jquery, ms, whatever) and customize the message to call instead?



"The javascript submit () method does not fire the onsubmit event, but bypasses it and submits the form directly." - http://www.webmasterworld.com/forum91/4047.htm

+1


a source


you have to put

return false



at the end of the dispatch function of the dispatch event

+1


a source







All Articles