HttpPostedFile

HttpPostedFile

System.Web (system.web.dll)sealed class

The HttpPostedFile class allows you to easily manipulate files that are uploaded by the client. An HttpPostedFile instance is provided by the PostedFile property of the System.Web.UI.HtmlControls.HtmlInputFile control.

You can use the SaveAs( ) method to save a posted file to disk synchronously. The method will return once the file is completely uploaded. Alternatively, you can get a System.IO.Stream object containing the file from the InputStream property and use it to work with the file asynchronously (while it is being uploaded).

public sealed class HttpPostedFile { // Public Instance Properties    public int ContentLength{get; }    public string ContentType{get; }    public string FileName{get; }    public Stream InputStream{get; } // Public Instance Methods    public void SaveAs(string filename); }

Returned By

HttpFileCollection.{Get( ), this}, System.Web.UI.HtmlControls.HtmlInputFile.PostedFile



ASP. NET in a Nutshell
ASP.NET in a Nutshell, Second Edition
ISBN: 0596005202
EAN: 2147483647
Year: 2003
Pages: 873

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net