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

Asked

Viewed 570 times

5

Working with web inasp.net mvc, I saw that it is possible to use Ajax.BeginForm() and Html.BeginForm().

What is the difference between the Ajax and that of Html?

1 answer

6

Basically, one builds a 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 update of the elements displayed with addition, modification or deletion of 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).

Browser other questions tagged

You are not signed in. Login or sign up in order to post.