Skip to content
This repository was archived by the owner on Dec 14, 2018. It is now read-only.
This repository was archived by the owner on Dec 14, 2018. It is now read-only.

RedirectToAction: add fragment support #3988

@Bartmax

Description

@Bartmax

I can't find a way to use RedirectToAction using a fragment.

I tried:

 RedirectToAction(nameof(Index), new { fragment= "contact-message" }); 

with no success, looking at source code I couldn't identity if this feature exists or not.

This works, but is kind of verbose:

var localUrl = Url.Action(nameof(Index), controller: null, values: null, protocol: null, host: null, fragment: "contact-message"); return new LocalRedirectResult(localUrl); 

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions