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
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,597 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,879 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.