You need to inherit your Controller
from Umbraco.Web.Mvc.SurfaceController
You can do this in controller like this:
public class DefaultController : Umbraco.Web.Mvc.SurfaceController
{
Public ActionResult YourMethod()
{
return CurrentUmbracoPage();
}
}
In View you call the Form like:
@using (Html.BeginUmbracoForm("YourMethod", "Default",new { @class = "YourclassName" }))
{
//DO Something
}
Now final step is to define your Route in RouteConfig.cs in App_Start Folder
public class RouteConfig
{
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}",
defaults: new { controller = "Default", action = "YourMethod", id = UrlParameter.Optional }
);
}
}