Is there any use to using html beginform without any parameters as opposed to a simple <form> tag?

Is there any difference between

<form method="post" action="/Controller/Action"></form>

and

@using (Html.BeginForm("Action","Controller")) {}

when other more complex parameters are not used?

I know this question sounds very thorough, but I carefully use a simple HMTL, such as the previous example.

+3
source share
1 answer

It does the same, and it is the same. One of the possible advantages of Razor syntax is that it is compiled, so there is no chance that you can run your code without neglecting to add the </form> tag. I think maybe this is also a bit readable, especially if the rest of the file is strongly Razor syntax.

+5

All Articles