开发者

Generic Handler not receiving full query string

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).

Generic Handler not receiving full query string

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',
'canc开发者_如何转开发elImg' : 'js/cancel.png',
...

And here is the result:

Generic Handler not receiving full query string

What am i doing wrong?

EDIT: added the full query string

Generic Handler not receiving 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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜