Hello,
I have a user registration web form page where users have to enter specific fields.
I go through and fill out the info but when I leave a required field blank I have a server side error check. When it does the error check I lose the document within my radAsyncUpload control. The file is already saved in the App_Data till I save it when the post is error free.
Can the control hold the file information till an error free post back is made?
I don't want my users to have to select their file multiple times.
Thank you,
Jerry
4 Answers, 1 is accepted
The RadAsyncUpload has a mechanism for keeping the selected file across postbacks and it involves setting a the PostbackTriggers property. You can learn more about it in the following documentation article.
You could use this functionality along with a HiddenField, the Value of which you can set to "valid" in the code behind and after the postback check the value and upload the file by clicking a hidden button. The selected file will be kept up to that point, because only a postback from Button1 will upload the files:
<script type="text/javascript"> function pageLoad() { var $ = $telerik.$; if ($("#HiddenField1").val() == "valid") { $("#HiddenField1").val(""); $("#Button1").click(); } }</script><asp:HiddenField runat="server" ID="HiddenField1" /><telerik:RadAsyncUpload runat="server" ID="RadAsyncUpload1" TargetFolder="~/Uploads" PostbackTriggers="Button1"></telerik:RadAsyncUpload><asp:Button Text="Upload" ID="Button2" runat="server" OnClick="Button2_Click" /><asp:Button runat="server" ID="Button1" Style="display: none;"></asp:Button>Regards,
Ivan Danchev
Telerik
Hi,
I have a problem with this RadAsnycUpload control wich is used multiple times on the first page of a Wizard that is implemented with MVP pattern and has a custom validation.
The settings for the multiple RadAsnycUpload controls are :
<uc1:UploadFilesControl ID="oUploadMatrix" runat="server" Path="\LoggerInfos\Matrix\"
Info="Hinweis: Mindestens eine *.dbc / *.ldf / *.xml-Datei ist erforderlich"
Style="margin-bottom: 15px" PostbackTriggers="btnOk" OnClientValidationFailed="OnMatrixFileValidationFailed" />
Now the problem :
Each time a validation error occurs and user corrects it the RadAsnycUpload loses the uploaded file.
Can you help me please with this problem ?
I have a similar issue where the file is getting lost when a validation fails.
How did you fix this issue?
Thanks
There is another forum thread on this scenario. Please check it out at Retain uploaded files for display after postback / validation problems.
Regards,
Rumen
Progress Telerik

