Reputation: 279
I have a controller that returns a redirect and I want to add an anchor link so it goes to a specific element. The problem I'm having is the element '#' gets converted to '%23'. I've tried encoding and decoding both # and %23 but it doesn't seem to work, so I feel like I'm missing something.
The code is:
return RedirectToCurrentUmbracoPage($"?success={success.ToString().ToLower()}"+"#sentletter");
I want the result to be
?success=true#sentletter
but it ends up as
?success=true%23sentletter
Thanks
Upvotes: 1
Views: 199