Validate fileinput value

Thread is closed for posting
3 posts, 0 answers
  1. Gang Xue
    Gang Xue avatar
    11 posts
    Member since:
    Jun 2008

    Posted 13 Aug 2008 Link to this post

    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. Erjan Gavalji
    Admin
    Erjan Gavalji avatar
    1455 posts

    Posted 15 Aug 2008 Link to this post

    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.
  3. Gang Xue
    Gang Xue avatar
    11 posts
    Member since:
    Jun 2008

    Posted 15 Aug 2008 Link to this post

    I see. Thanks a lot for the reply.
Back to Top