Im using the RadAsyncUpload control with 4-5 upload fields.
I want to distinguish the files based on the upload input field (because I want different validation for each one).
For this purpose I have added hidden textboxes as in "Adding Information to Uploaded Files" example.
How I can access these fields without to upload the file(postback)? Im using ajaxmanager request to get the file data for preview purposes,
but it seems that the additional field info is not "uploaded" with the temporary file.
9 Answers, 1 is accepted
RadAsyncUpload currently does not support additinal fields. We will get this fixed for the upcoming Q2 release. Meanwhile I suggest that you use manually placed RadTextBoxes and fixed count of RadAsyncUpload fields. Please excuse us for the caused inconveniences.
Regards,
Genady Sergeev
the Telerik team
I am trying to use the hidden textboxes as I have mentioned in my older post,
this time in the Proccess method of the custom HttpHandler which I have implemented based on the relative demo.
But every time I'm trying to get the field value with file.GetFieldValue("Title") ,where file is an UploadedFile instance,
it returns null.
The additional fields support hasn't been added in the Q2 release?
Thank you very much
This feature is indeed missing in the Q2 release. We didn't implement it right away as we think that the existing approach can be improved to provide the same or better functionality.
We're not ready with this and I can't think of an easy way to achieve this with RadAsyncUpload, as it won't post anything else to the handler besides the file and the control configuration.
Can you describe your scenario in more detail? How is the validation different for each file input? Perhaps we can figure out a way to do it with the existing functionality.
Greetings,
Tsvetomir Tsonev
the Telerik team
Content-Disposition: form-data; name="rauPostData"
/wEFrgN7IlRhcmdldEZvbGRlciI6Ii93RmxNS0tpMGgwZmZwRnUxZXo1emYyUXY0QzVSTjQ9IiwiVGVtcFRhcmdldEZvbGRlciI6Ii93RUZSV002WEdsdVpYUndkV0pjZDNkM2NtOXZkRngzYzNOY1ZtbHlkSFZoYkVScGNtVmpkRzl5YVdWelhEZ3dNRE5jUVhCd1gwUmhkR0ZjVW1Ga1ZYQnNiMkZrVkdWdGNCVHhnNFB6UGRqUjJUQ2lBMWhpQ0tJN3I3VHoiLCJNYXhGaWxlU2l6ZSI6MTAyNDAwLCJUaW1lVG9MaXZlIjp7IlRpY2tzIjoxNDQwMDAwMDAwMDAsIkRheXMiOjAsIkhvdXJzIjo0LCJNaWxsaXNlY29uZHMiOjAsIk1pbnV0ZXMiOjAsIlNlY29uZHMiOjAsIlRvdGFsRGF5cyI6MC4xNjY2NjY2NjY2NjY2NjY2NiwiVG90YWxIb3VycyI6NCwiVG90YWxNaWxsaXNlY29uZHMiOjE0NDAwMDAwLCJUb3RhbE1pbnV0ZXMiOjI0MCwiVG90YWxTZWNvbmRzIjoxNDQwMH19UVhbxAGU7k2kb4kzI3T/rznw+z4=&/wEFgAFUZWxlcmlrLldlYi5VSS5Bc3luY1VwbG9hZENvbmZpZ3VyYXRpb24sIFRlbGVyaWsuV2ViLlVJLCBWZXJzaW9uPTIwMTEuMS40MTMuMzUsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49MTIxZmFlNzgxNjViYTNkNJD/duWN6R3LStIc/aEs83Nx4Ihj
-----------------------------7db2d8254051a--
Using a custom handler how does this get decoded?
rauPostData is a serialized data for the configuration of the RadAsyncUpload control. Please review GetConfiguration method of the AsyncUploadHandler.cs source file. It deserialize the rauPostData .
Configuration of the RadAsyncUpload is passed as a overload parameter into Process method of the AsyncUploadHandler class.
Kind regards, Peter Filipov
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
I would like to decode:
string
rauPostData = context.Request.Form["rauPostData"];
To deserialize rauPostData variable we use a custom class. It uses the LosFormatter. To know in details how the GetConfiguration method works, please review the source code of our controls.
Regards,
Peter Filipov
the Telerik team
Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>
System.FormatException was caught
Message=Invalid character in a Base-64 string.
Source=mscorlib
StackTrace:
at System.Convert.FromBase64String(String s)
at System.Web.UI.ObjectStateFormatter.Deserialize(String inputString)
at Telerik.Web.UI.LosSerializer.Deserialize(String serializedObject, Boolean enableMacValidation)
at Telerik.Web.UI.LosSerializer.Deserialize(String serializedObject)
string rauPostData = context.Request.Form["rauPostData"];
object o =
LosSerializer.Deserialize(rauPostData);
Content-Disposition: form-data; name="rauPostData"
Still No Joy.
In case you want to use custom configuration please review the following demo. The only way to get implementation of GetConfiguration method is from the source code of RadAsyncUpload.
Kind regards,
Peter Filipov
the Telerik team
Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>