
To upload files the 'System.Web.UI.HtmlControls' namespace has a class called 'HTMLInputFile' . With this class you can access the properties of the traditional input type="file" component. HTMLInputFile class contains a property called 'PostedFile' which returns a instance of the class 'HttpPostedFile'. This class has various methods which help us to get various properties of the posted file. Also the 'HttpPostedFile' class has a method 'SaveAs()' which saves the posted file to your server. The 'HttpPostedFile ' class makes manipulation of the posted file very easy.
|