Click here to Skip to main content
15,885,767 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I would like to check the document exist or not. This is the source code for Document Upload.
Posted
Updated 21-May-15 18:13pm
v2
Comments
Mehdi Gholam 21-May-15 2:57am    
Document exists where?
Manoj Sawant 21-May-15 3:28am    
do you want to check whether, it is already uploaded????

1 solution

You can check if the user has selected a file with FileUpload.HasFile[^]
C#
if (fuDocument.HasFile)
   {
   ...
but you can't check specifically to see if a file exists on the client computer.
It's simple to check if the file exists on the server already though:
if (File.Exists(path))
   {
   ...
 
Share this answer
 
v2

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