ASP.NET 3.5 and above only

Obout.Ajax.UI Controls - File Upload - Server side

Obout.Ajax.UI.FileUpload.PostedFileInfo class

<%@ Register Assembly="Obout.Ajax.UI" Namespace="Obout.Ajax.UI.FileUpload" TagPrefix="obout" %>


Name Description
propertyContentLength Int. Gets the size of an uploaded file, in bytes.
propertyContentType String. Gets the MIME content type of a file sent by a client.
propertyFileName String. Gets the fully qualified name of the file on the client.
propertyInputStream Stream. Gets a Stream object that points to an uploaded file to prepare for reading the contents of the file.


Name Description
methodvoid SaveAs(string FilePath) Saves the contents of an uploaded file to FilePath.

protected void Page_Load(object sender, EventArgs e)
  if (Page.IsPostBack)
     string result = "";
     foreach (PostedFileInfo info in fileUpload1.PostedFiles)
        result += " Name: " + info.FileName
                 + " Length: " + info.ContentLength
                 + " Content type: " + info.ContentType + "<br>";
     if (result.Length == 0)
        result = "No files uploaded";
     label.Text = result;

"Thanks for the great work on the suite - I'm lovin' it so far."

Dave Vanderkloot

Random testimonial   All testimonials