-
Notifications
You must be signed in to change notification settings - Fork 2.1k
RedirectToAction: add fragment support #3988
Comments
@Bartmax yup that's pretty much the way to do it. Certainly back in the day sending a fragment never made sense in a redirect because that's a server concept, and fragments are a client concept. Is the scenario here that you want to send the fragment to a client library to later process something? |
I'm using it in a simplier scenario (non client-side). So, I don't agree with the never makes sense ;) I have a contact us form, after filling all fields and posting a welcome message appears "thanks for contacting us" on the same page. Is more like "plain-old" html use case here. I'm not sure if I was describing the scenario clear enough. Let me know if that helps. |
@Bartmax thanks that makes sense. |
This would be easy to add. |
+1 |
What if the action being redirected to has a parameter called fragment? If we take fragment from the route values and make it the fragment, wouldn't it essentially block this scenario:
|
@juunas11 that's right, so we probably wouldn't use a special |
@dougbu assigning this bug to you because I assigned the associated PR to you as well. |
Thanks very much @juunas11 ! |
woot! amazing, thanks @juunas11 ! |
I can't find a way to use RedirectToAction using a fragment.
I tried:
with no success, looking at source code I couldn't identity if this feature exists or not.
This works, but is kind of verbose:
The text was updated successfully, but these errors were encountered: