umbraco7

Umbraco Begin Form vs Begin Form


I've just have a little curiosity about this two code.. Both of them is working but what is the difference?

Html.BeginUmbracoForm() vs Html.BeginForm()

Solution

  • The BeginUmbracoFrom method helps with determining the correct paths honoring the Umbraco routing conventions, for example you can give it a strongly typed Controller class and it creates the path to the surface controller. This also allows you to refactor more easily

    Html.BeginUmbracoForm<TestSurfaceController>("PostVals")
    

    It has a bunch of different overloads, check them out here