This is a migrated thread and some comments may be shown as answers.

[Solved] Upload with metadata validation

3 Answers 75 Views
Upload
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Kot
Top achievements
Rank 1
Kot asked on 24 Jun 2012, 10:36 PM
Hi,

I like your upload control.

In my scenario I should select a user from a drop-down and upload a file.
If the user was not selected, a validation message should be shown.
The drop-down and upload controls should be in a modal window.
And I don't want to reload the page after successful upload.

You can see my solution in attachment.
What do you think? Is this a good practice? Can I somehow improve it?

BTW, at first I was using the release 2011.2.914 and I noticed a bug in IE.
After upload fails first time IE begin to consider all other uploads successful, even when controller action returns a non empty string.

You can see that after the upload fails first time, I select an another file, didn't selected any user and IE considers that upload was successful.

Everything works as expected with latest release, but there is a bug in 2011.2.914.
I think this bug starts after I replace the content of modal window.
Somehow it affects Upload control and IE doesn't behaves as expected after that.

I just want to be sure that you know about that bug.
I assume it is fixed, right?

3 Answers, 1 is accepted

Sort by
0
Kot
Top achievements
Rank 1
answered on 09 Jul 2012, 02:40 AM
Can anyone answer my question?
0
Stephen
Top achievements
Rank 1
answered on 12 Jan 2013, 07:00 AM
Hi Kot,

Did you ever come right with this? I'm trying to do exactly the same thing - I need the user to choose a value (using an autocomplete), and only once a value has been selected, be able to upload the file, along with the ID of the selected record in the autocomplete.

I'm quite disappointed to see that nobody has answered your post in over 6 months. Telerik always raves about how good their online community is etc etc. This was one of the selling points when we chose Telerik...
0
Daniel
Telerik team
answered on 17 Jan 2013, 07:20 AM
Hello,

Addition data can be passed with the upload through the OnUpload event like described in this documentation topic. If a value has not been selected you can use the event argument preventDefault() method to cancel the upload and display a message to the user that he should select a value.

Regards,
Daniel
the Telerik team
Check out the successor of Telerik MVC Extensions - Kendo UI for ASP.NET MVC - and deem it for new ASP.NET MVC development.
Tags
Upload
Asked by
Kot
Top achievements
Rank 1
Answers by
Kot
Top achievements
Rank 1
Stephen
Top achievements
Rank 1
Daniel
Telerik team
Share this question
or