response.redirectpermanent in customerrorpage keeps fragment (bookmark)

2Compute bv 0 Reputation points
2023-08-28T16:14:37.78+00:00

I have a custom Error page trapping http error 404.
In the load event (VB.NET) I do a reponse.redirectpermanent to another page

eg. : Browser navigate to https://www.mysite.com/sometUrlwhichdoesnotexist**#abc**

In customerrorpage reponse.redirectpermanent to /anotherurlwhichdoesexist

In browser url shows https://www.mysite.com/anotherurlwhichdoesexist**#abc**

I do not expect the fragment #abc to show url of redirected item.

Is this a bug or how do just https://www.mysite.com/anotherurlwhichdoesexist without suffix #abc

Visual studio 2022 / IIS 10

ASP.NET Web Forms
ASP.NET Web Forms
A part of the ASP.NET web application framework that can be used to create ASP.NET web applications.
619 questions
VB
VB
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,312 questions
{count} votes