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

Stop Upload before it starts

1 Answer 24 Views
Upload (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Kerry
Top achievements
Rank 1
Kerry asked on 28 Nov 2008, 06:21 PM
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

1 Answer, 1 is accepted

Sort by
0
Veselin Vasilev
Telerik team
answered on 01 Dec 2008, 04:12 PM
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.
Tags
Upload (Obsolete)
Asked by
Kerry
Top achievements
Rank 1
Answers by
Veselin Vasilev
Telerik team
Share this question
or