I'm trying to pass some values from one .aspx page to an handler (.ashx). I was doing this by using the session variable but i came to realize that this works badly on Firefox and Chrome and i abandoned that idea and decided to pass the values by query string.
I am setting the handler like this on the uploadify init function.
'uploader' : 'js/uploadify.swf',
'script' : 'UploadVarios.ashx?util_Id=' + $('#<%= util_Id.ClientID %>').val() + '&util_NomeColaborador=' + $('#<%= util_NomeColaborador.ClientID %>').val() + '&util_IdPosto=' + $('#<%= util_IdPosto.ClientID %>').val() + '&ValueEstadoUploadVarios=' + $('#<%= ValueEstadoUploadVarios.ClientID %>').val() ,
'cancelImg' : 'js/cancel.png',
...
However, when i try to access the query string on the handler, only the first parameter is avaliable (in this case util_Id).

I thought that there may be something wrong with the way i was concatenating the string so i made a little test and changed it to this:
'uploader' : 'js/uploadify.swf',
'script' : 'UploadVarios.ashx?id1=0&id2=0',
'cancelImg' : 'js/cancel.png',
...
And here is the result:

What am i doing wrong?
EDIT: added the full query string

Just a suggestion - try to encode your query string like below.
'uploader' : 'js/uploadify.swf',
'script' : 'UploadVarios.ashx%3fid1%3d0%26id2%3d0',
'cancelImg' : 'js/cancel.png',
Probably that'll do the trick. If not, you could always go for decoding it with HttpUtility.UrlDecode and get key-value collection with HttpUtility.ParseQueryString
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With