I have an asp.net application, that onclick takes the user to a different part of the page. The onclick causes a postback, and when the page loads, the part of the page that I want to go to is set to display none
So, what I need to do is detect the presence of #apply in the URL.
This is proving more difficult than I would expect.
I have tried:
string path = HttpContext.Current.Request.RawUrl;
string path = HttpContext.Current.Request.Url.Fragment;
and every other option I could find, including the answer from Get part of a URL after domain using Regex, which I thought would work, although I used URL not uri.
Is it possible to do this?