SurfaceController
1.Creating an action to partake in a Child Action Macro. To define this is very simple and follows
the exact same MVC principles to creating a Child Action...just add a ChildActionOnlyAttribute to youraction method.
[ChildActionOnly]
public ActionResult DisplayTwitterFeed()
2.Creating a child action to simply be used as a normal MVC child action which get rendered using
@Html.Action or @Html.RenderAction.
3.Create an action to handle some posted form data:
[httpPost]
public ActionResult HandleMyFormSubmission(MyFormModel model)
4.Maybe you'd like to track all links clicked on your page. you could use jquery to update all of your
links on your page to point to your custom action URL with the real URL as a query string. Then your
custom action will log the real link address and redirect the user to where they want to go.
--------------------------------------------------------------------------------------
// e.g. if modelstate is invalid
return CurrentUmbracoPage();
// redirecting back to original page after a successful post
return RedirectToCurrentUmbracoPage();
// Redirecting to another page after a successful post
return RedirectToUmbracoPage(12345)