c# - How to get Url from server side -
c# - How to get Url from server side -
this question has reply here:
how url hash (#) server side 6 answersis there way on getting current url in mvc same in code in window.location.href, can manage content?,
problem
i have url https://mylink.com/data?#address=ph want address value. problem is, when tried url doing request in controller, https://mylink.com/data get, querystring empty.
my codes:
public string data() { var url = request.url; var addr = url.indexof('#') > -1 ? url.substring(url.indexof('#'),url.length): ""; homecoming addr; }
any suggestion accepted, give thanks 1 time again in advance
the problem querystring is empty. #
, after known fragment , clientside thing. in general not sent server.
if need info here on server chances should in querystring instead of fragment.
c# asp.net-mvc
Comments
Post a Comment