MVC 3.net I want to add an anchor to the end a url.
I tried to include an anchor query string but the hash '#' changes to %23 or something like that in the url.
Is there a way of working around this?
MVC 3.net I want to add an anchor to the end a url.
I tried to include an anchor query string but the hash '#' changes to %23 or something like that in the url.
Is there a way of working around this?
There is an overload of the ActionLink helper that allows you to specify the fragment:
will produce (assuming default routes):
UPDATE:
and if you wanted to do this within a controller action performing a redirect you could use the GenerateUrl method: