Keeps a navigation log of pages opened to return to by using the URL and primary key to reopen the previous records.
The model primary key to use when returning.
The url to return to. This should include Area/Controller/View.
Name of the primary key field to use. Not required if using PrimaryKey above.
Value of the primary key field to use. Not required if using PrimaryKey above.
When the same page url is detected in the list, by default it will not be added again. Make this true to force adding another record at the same URL.
Adds extra fields to the return.
The model field to use when returning.
Name of the field to use. Not required if using Field above.
Value of the field to use. Not required if using Field above.
Override the name of the field when returning.
Creates a button which navigates to another url with page return functionality.
The url to navigate to. This should include Area/Controller/View.
Name of the field to use for remote URL.
Value of the field to use. This will auto update if empty to the value in a field on the current page with the same ID.
This simulates the Save button being pressed to allow backend attributes to find the correct method to call.
Helper functions for Page Return.
public static IActionResult DoReturn(Func<IActionResult> defaultAction, HttpContext context, ITempDataDictionary tempData)
When ready to return use this method. The defaultAction will be used if already at the top of the stack, otherwise it will redirect back to the previous page and record.
<page-return primary-key="MyPrimaryKeyFieldId" url="/Controller/Edit" /><page-return primary-key="MyPrimaryKeyFieldId" url="/ChildController/Edit" />public IActionResult EditReturn(){ return PageReturnHelper.DoReturn(() => RedirectToAction("Edit"), HttpContext, TempData);}<page-return primary-key="MyPrimaryKeyFieldId" url="/Controller/Edit"> <page-return-field field="MyFieldId" /> <page-return-field field="MyField2Id" /></page-return><page-return-edit url="/Controller/Edit"> <page-return-field field="MyFieldId" /> <page-return-field field="MyField2Id" /></page-return>