Answer: With the help of
HasFile property of File-Upload control,we can check whether File-Upload control contains any file or not.
It returns true if File-Upload control contains any file(s) otherwise returns false.
For Example:-
if(fld_upload.HasFile)
{
//it contains file
}
else
{
//it does not contain any file
}
Where,fld_upload is our Asp.Net File upload control.
Asked In: Many Interviews |
Alert Moderator