Working with web in asp.net mvc
, I saw that it is possible to use Ajax.BeginForm()
and Html.BeginForm()
.
What is the difference between Ajax
and Html
?
Working with web in asp.net mvc
, I saw that it is possible to use Ajax.BeginForm()
and Html.BeginForm()
.
What is the difference between Ajax
and Html
?
Basically, one builds one form using Ajax, and the other builds a simple form, both in HTML.
In Ajax forms, the request is sent by JavaScript and there is usually no transition from the current page: only updating the elements displayed with adding, modifying or deleting them. The transition can be made a posteriori using additional JavaScript code, if applicable.
Simple forms assume a page transition and usually work with only two verbs: POST
(whose form values are not included in the URL) and GET
(whose values are in the URL).