The posted file is automatically available as HttpPostedFileBase parameters in the action of the control. To upload a file on the server we require a file input control in html form with enctype set to multipart/form-data. So let’s start with the example. We are using Ajax post and get method in below example.