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

Validate fileinput value

2 Answers 80 Views
Upload (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Gang Xue
Top achievements
Rank 1
Gang Xue asked on 13 Aug 2008, 02:13 PM
Hi,

Is there any way to detect that an invalid file path has been put into the RadUpload control? I tried to type in an invalid value into the fileinput box, which SILENTLY causes the post back to fail. There is no error or warning message and it makes the error handling a bit difficult.

Any suggestions please. Thanks a lot

2 Answers, 1 is accepted

Sort by
0
Erjan Gavalji
Telerik team
answered on 15 Aug 2008, 05:58 AM
Hi Gang Xue,

The silent fail of the postback when an invalid path is typed to the file input is the default browser behavior. To my regret the browser limits the control over the file system and it is not possible to check if a path entered to the file input field is valid or not via JavaScript. You can make the RadUpload file inputs readonly for the purpose - this way the users will be able to populate the text area only via the Browse dialog.

Kind regards,
Erjan Gavalji
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Gang Xue
Top achievements
Rank 1
answered on 15 Aug 2008, 04:28 PM
I see. Thanks a lot for the reply.
Tags
Upload (Obsolete)
Asked by
Gang Xue
Top achievements
Rank 1
Answers by
Erjan Gavalji
Telerik team
Gang Xue
Top achievements
Rank 1
Share this question
or