I'm encoding the parameters in a url and setting the href of an a tag as follows:
href="javascript:var win=window.open('LayerPreview.aspx?tLNUMCswKSXpnGpQy1rWev26c5euEUa97eqiZYdDpMvDcKNbi6Z05Q3WC5DhG%2b8HJFGHAo%2fHiSFrtEEsHiConkpaT2aJ2WV0Hxxqo2l1bmkNdAotVVvI%2fT4JtE%2fc3dJ8MEAhM3NJZ15qk3fkW87q9A%3d%3d','','width=800,height=600,resizable=no','true');"
But when the link is clicked, in the Page_Load of LayerPreview.aspx, the query string has been modified, i.e. the original:
tLNUMCswKSXpnGpQy1rWev26c5euEUa97eqiZYdDpMvDcKNbi6Z05Q3WC5DhG%2b8HJFGHAo%2fHiSFrtEEsHiConkpaT2aJ2WV0Hxxqo2l1bmkNdAotVVvI%2fT4JtE%2fc3dJ8MEAhM3NJZ15qk3fkW87q9A%3d%3d'
becomes:
tLNUMCswKSXpnGpQy1rWev26c5euEUa97eqiZYdDpMvDcKNbi6Z05Q3WC5DhG+8HJFGHAo%2fHiSFrtEEsHiConkpaT2aJ2WV0Hxxqo2l1bmkNdAotVVvI%2fT4JtE%2fc3dJ8MEAhM3NJZ15qk3fkW87q9A=%3d
This, obviously, screws up my decoding.
Any ideas?
Thanks,
Carl.
Edit: I'm already using System.Web.HttpUtility.UrlEncode and System.Web.HttpUtility.Decode.
Here's the operation:
- Generate the plain text query string.
- Encrypt the query string.
- Run it thru System.Web.HttpUtility.UrlEncode.
When reading the query string I just do the opposite:
- Run it thru System.Web.HttpUtility.UrlDecode.
- Decrypt the query string.
- Read the query string.
This works everywhere else in my web app but not when assinging the link for the window.open url or any other javascript method.