I am generating a return url link so when the user hits the close button on this page they return to this ReturnUrl.
This works fine in dev environment, but in uat environment I have
Notice the extra 01 on the ReturnUrl parameter.
So to generate the ReturnUrl bit I'm currently using
Uri.EscapeDataString(Request.Url.AbsoluteUri)
As I dont have direct access to the uat environment I dont know what will definetly work until after a release cycle so if I can avoid getting it wrong the first time that would be helpful.
Looking at Request.Url in debug the possibilities I have
DnsSafeHost or Host
which could be used with
AbsolutePath or LocalPath or PathAndQuery
or I have
OriginalString
Or I maybe I could use the referer instead?