Get current fragment in Route, ASP.net MVC

前端 未结 2 1801
有刺的猬
有刺的猬 2020-12-19 19:16

Is there away to get the current fragment from a route that was issued via action link. This is how I am getting the action from the route.

string cu

2条回答
  •  不知归路
    2020-12-19 20:09

    No, you can't do anything like this. The fragment (everything that follows the # sign in an url) is never sent to the server by the browser, so the sole fact of talking about getting the url fragment server side simply doesn't make sense.

    So if you have the following url: http://example.com/foo/bar?key1=value1#abc the server will never be able to fetch abc simply because the client will never send it.

提交回复
热议问题