' Return whether a file uploader control has posted a file to the serverFunction HasUploadedFile(ByVal fileCtl As _ System.Web.UI.HtmlControls.HtmlInputFile) As Boolean ' to return True the control's PostedFile must be not null, ' and the length of the posted file must be greater than 0 Return (Not fileCtl.PostedFile Is Nothing) AndAlso _ fileCtl.PostedFile.ContentLength > 0End Function