Including hash values in ASP.NET MVC URL routes

后端 未结 4 1217
[愿得一人]
[愿得一人] 2020-12-01 09:08

I need to implement hash value i.e the Url should look like this:

/home/index/#create

For this have added a route:



        
4条回答
  •  -上瘾入骨i
    2020-12-01 09:26

    As stated there is no way to do this using routing. The only possible solution is to append the # fragment to your url when redirecting in the actions of your controller. Eg.

    return Redirect(Url.Action("Index", "Home") + "#create");
    

提交回复
热议问题