2

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()
gill23
  • 593
  • 1
  • 5
  • 19

1 Answers1

5

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

Mark
  • 3,231
  • 3
  • 32
  • 57