tags:

views:

38

answers:

1

I want to check whether the file upload control has any file or not because I want to do the validation on it. How can I do it?

A: 

You can check the HasFile property on the fileupload control:

http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.fileupload.hasfile.aspx

XIII
+1 correct for ASP.NET, but this may not be the answer the user is after since he hasn't specified what platform he's talking about.
Chris