---
title: "FileUpload.hasFile is always False"  
description: "FileUpload.hasFile is always False"  
author: "Anonymous User"  
published: 2014-09-05  
updated: 2014-09-19  
canonical: https://www.mindstick.com/forum/2255/fileupload-hasfile-is-always-false  
category: "asp.net"  
tags: ["asp.net"]  
reading_time: 1 minute  

---

# FileUpload.hasFile is always False

I have a [FileUpload control](https://www.mindstick.com/articles/331/validating-fileupload-control-for-specific-file-type-and-required-field) (and it's not inside an [UpdatePanel](https://www.mindstick.com/articles/151/asp-dot-net-ajax-server-control-updateprogress-updatepanel)) and its hasFile [property](https://www.mindstick.com/blog/205/property-notification-in-c-sharp) is always False.

<[asp](https://www.mindstick.com/articles/751/introduction-to-asp-dot-net-mvc):FileUpload ID="certificateUploader" runat="[server](https://www.mindstick.com/articles/43769/what-is-serverless-architecture-is-it-worth-switching-over)"/>

## Replies

### Reply by Anonymous User

<input id="filMyFile" type="file" runat="server"></input>

In code save file to server:

```
HttpPostedFile myFile = filMyFile.PostedFile;           string fullPath=Server.MapPath("~/UploadDocuments/") + myFile.FileName;myFile.SaveAs(fullPath);
```

\

Hope this will solve your problem\
\

### Reply by Sumit Kesarwani

Hi Pravesh, try this:\

```
<input id="filMyFile" type="file" runat="server"></input>
```

In code save file to server:

```
HttpPostedFile myFile = filMyFile.PostedFile;           string fullPath=Server.MapPath("~/UploadDocuments/") + myFile.FileName;myFile.SaveAs(fullPath);
```


---

Original Source: https://www.mindstick.com/forum/2255/fileupload-hasfile-is-always-false

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
