I cant get the full url of the page that I am working on. This is the url that I want to get http://localhost:54570/Shipment/ShipmentDetails.aspx?HawbBLNo=NEC00000004#BFT
The result is only http://local/Shipment/ShipmentDetails.aspx?HawbBLNo=NEC00000004
on this code
protected void btnSave_Click(object sender, EventArgs e)
{
url = HttpContext.Current.Request.Url.AbsoluteUri;
UpdateDetails();
Response.Redirect(url);
}
there is no way to get hash content on server side because hash are never posted to the server
see this question for some tricks How to get Url Hash (#) from server side
It's not possible to retrieve the #anchor from the server side in ASP.NET
This is a client-side flag to tell the browser to move to a specific place within the page.
Please take a look at this same discussion
Retrieving Anchor Link In URL for ASP.Net
and
Get full URL with hash to use as ReturnUrl