Server.Transfer("~\\Error Pages\\404.aspx");
Since ~ returns a path with backslashes
Or:
Server.Transfer("~/Error Pages/404.aspx");
Seen used and fits the docs ("The URL path") more
I tried and they both work.
So why am I asking?
Because if you don't do something the correct way, it might work now, but it might fail at some point and then it can be pretty difficult to debug.