What is the difference between Ajax.BeginForm and Html.BeginForm in Asp.net MVC

5

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 ?

    
asked by anonymous 08.07.2016 / 23:38

1 answer

6

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).

    
09.07.2016 / 01:05