Referrer
Last updated
Last updated
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.
Method name | Return type | Description |
---|---|---|
Method name | Return type | Description |
---|---|---|
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.
This will be (depending on context and app structure) rendered into something like:
RedirectToReferrer
RedirectResult
Creates RedirectResult
object specifying redirect to url depending on presence __Referrer
key (specified in ReferrerConstants.Key
) in HttpRequest.Form
. In case of existing of such key the corresponding url from From
value will be used to redirect to. In other case the provided url
parameter will be used.
GetReferrer
string
Gets a string containing url gotten from HttpRequest.Form
with __Referrer
key. If there are no such key then the specified url will be returned instead.