Get entire URL from Request.Headers["Referer"]?

Viewed 19

I'm using the TableFilter javascript library in a .NET 6.0 project (C#). When I've filtered out some data I can click on an item to edit it. After I've edited it I would like to return to the previous page, with the same filters applied.

When I come to the Edit page I can use Request.Headers["Referer"].ToString() to catch the referring URL. But it always only contains the URL up until the last bit, which tells TableFilter which filters to apply.

An example. If this is the URL when I've filtered:

https://localhost:7290/foo?a=2361ded1-b9bc-4007-840b-e5ddb864002b#%7B%22col_1%22%3A%7B%22flt%22%3A%22Monitor%22%7D%7D

Request.Headers["Referer"].ToString() just contains everyting up until the #:

https://localhost:7290/foo?a=2361ded1-b9bc-4007-840b-e5ddb864002b

Anyone know of the way for me to catch the last part as well?

0 Answers
Related