Raduploadhandler Request.Form["0_MyKey"] ???

2 posts, 0 answers
  1. Matthew
    Matthew avatar
    2 posts
    Member since:
    Jun 2010

    Posted 28 Jun 2010 Link to this post

    I have a project on my Vista x64 machine which I co-develop with others using Windows 7 x86.  The code builds and runs fine on my machine, and builds but doesn't run as expected on Windows 7.  My machine is using Telerik 2010.1.422.1040, their machine is using Telerik 2010.1.603.35.  Code was originally built on Windows 7, then I was called in to help fix my RadUploadHandler idea.  On the client-side we set e.FileParameters.Add("Name", "somestring").  In the handler this.Request.Form["Name"] is always null.  If I debug and look at Form's items, all keys are prefixed with "0_".  I couldn't figure out why in the world everything was being prefixed, when it hasn't been the case in previous projects on my machine, nor this project on my Vista machine.  So, finally, I gave up, and went back to my Vista machine to debug, and... there's no problem; everything is working as expected; Request.Form["Name"] is the value I passed it.  So, I thought, since there was a version difference, I'd have them manually use the Telerik references I had by temporarily including them in the project's lib directory, and referencing from there.  This resulted in no change on Windows 7.  Again, it works like a charm on Vista.  So, to get them running, we reverted changes, and stuck with the latest Telerik version for this project, and prefixed all Form parameters we wish to access in the handler with "0_", and everything works, for that OS only - meaning I can't develop and test this code from Vista.  Can you explain why all the Form parameters are prefixed as such, and a solution?



  2. Valentin.Stoychev
    Valentin.Stoychev avatar
    2198 posts

    Posted 29 Jun 2010 Link to this post

    Hello Matthew,

    There is a breaking change with the latest binaries in case you have a custom upload handler. To get a param value you should not use this.Request.Form[paramName] and you should replaced it with this.GetQueryParameter(paramName).

    It is not OS related, but related to the latest of version of the binaries and the RadUploadHandler.dll that you are referencing in your Web project.

    Please apply the change and let us know if you have any more problems with this.

    The reason for the change is that now we support multiple files upload in a single request. That is why all file specific parameters are prefixed with the file index.

    Please let us know how it goes!

    Kind regards,
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. DevCraft R3 2016 release webinar banner
Back to Top