devxlogo

HasUploadedFile – Return whether a file uploader control has posted a file to the server

HasUploadedFile – Return whether a file uploader control has posted a file to the server

' 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

devxblackblue

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist