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 answers

is 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

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -