Stop Upload before it starts

Thread is closed for posting
2 posts, 0 answers
  1. Kerry
    Kerry avatar
    61 posts
    Member since:
    Nov 2008

    Posted 28 Nov 2008 Link to this post

    Hello, I have a Upload control that depends on some other fields on the webpage being set to a certain values before it starts the upload.  When I click the asp submit button I check these values server side and if they are not set proper I display a message and return.  THe problem is it seems the upload process starts then after some time (depending upon the size of the file) the message appears.  Can I not check the values on the page before the upload actually starts.  I tried using asp field validators but there are issues using this as I have other fields on the screen that cause postbacks this cause the validator to check the fields prematurally.

    THanks Kerry
  2. Veselin Vasilev
    Admin
    Veselin Vasilev avatar
    2992 posts

    Posted 01 Dec 2008 Link to this post

    Hi Kerry,

    The file upload will start as soon as there is a postback. So, you need to perform your custom checks using javascript before the form is submitted.
    You can use asp.net validators and set the CausesValidation property to False on those controls which should not cause validation.

    Best wishes,
    Veselin Vasilev
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Back to Top