ajax asyncupload control

Posted by Sandhya under ASP.NET on 12/3/2010 | Points: 10 | Views : 1284 | Status : [Member] | Replies : 1

I'm developing a feedbak form using ajax.In that I'v used AsyncFileUpload control to upload some documents to the required path when submit button is clicked.
I wrote script code to check File Content Type & File size while uploading.The code displays message accordingly as file extension not supported and file size is too large to upload correctly but..the file is uploaded successfully when the button is clicked.
I tried to display alert msg box to prevent it but it's not working
Now I need solution to prevent the form from submission.


Posted by: SheoNarayan on: 12/3/2010 [Administrator] HonoraryPlatinum | Points: 25

In the alert function, write "return false;". The idea should be that the form should not be submitted so somehow you will have to stop that. As you have not provided the code of alert I can't say what and where you need to write however generally you need to write return false at the last of the function if your validation has failed.

Thanks, hope this will help.

Sheo Narayan

Sandhya, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response