Page.ResolveClientUrl and invalid paths
For some reason, when I tried to do:
Page.ResolveClientUrl("~/errorpage.aspx?Page=" + url);
I got the error that this was an invalid virtual path, even though it wasn't. It seemed like the error was with the url because it may have been formatted like "httP://localhost/default.aspx" and that could have caused the error. So the test was to pull the url outside the method like:
Page.ResolveClientUrl("~/errorpage.aspx") + "?Page=" + url;
And this solved the problem greatly.