Click here to Skip to main content
15,896,486 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi EveryOne,

Actually i'm confusing to check validation while doing file upload. My Requirement is i have 2 Upload Controls, like FU1, FU2. FU1 is mandatory to fill that information so i need to check one condition If user click FU2 without save file from FU1 need to display error message " please upload file from fileupload 1". After upload file from FU1 then only able to upload file from FU2, and That file should be in excel file also. If that is excel file then only we want to save.
How to do this can any one give me some suggestion out of this...
Posted
Updated 8-Aug-13 0:39am
v2

1 solution

Hi,

Use the below mentioned code.It will check whether the selected file has been uploaded or not .If not uploaded it won't open the dialog for second file upload.

How to check file exist or not in Ajax toolkit file uploadcontrol[^]


Before doing that add a onclickevent to your second file upload control say FU2.

whick will be like

<asp:ajaxfileupload runat="server" id="FU2" onclick="return checkAttachments()" xmlns:asp="#unknown">


Regards
Hsakarp.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900