Referrer

This part contains tools for working with HTTP referrer and other related things. Typical use-case of such tools is, for example, specifying of redirect back to entity's details form from edit form is needed after pressing "Ok" button or "Cancel" button.

Controller extensions

HttpRequest extensions

ReferrerTagHelper

An TagHelper implementation adding referrer link to page. It could be helpful when, for example, redirect back to entity's details form from edit form is needed after pressing "Ok" button or "Cancel" button.

<a asp-referrer="@referrerAddress" class="btn btn-link btn-cancel">Cancel</a>

This will be (depending on context and app structure) rendered into something like:

<a class="btn btn-link btn-cancel" href="/admin/users/7">Cancel</a>
<input name="__Referrer" type="hidden" value="/admin/users/7"/>

Last updated