Friday, February 10, 2012

File Upload in asp.net

if (fUpload.PostedFile != null && fUpload.PostedFile.ContentLength > 0)
        {
            filename = Path.GetFileName(fUpload.PostedFile.FileName);
            string extension = Path.GetExtension(filename);
            string contentType = fUpload.PostedFile.ContentType;
            byte[] document = fUpload.FileBytes;        
            ScriptManager.RegisterStartupScript(Page, this.GetType(), "Close", "CloseFileUploadPopUp();", true);
        }

No comments:

Post a Comment

Comments

Protected by Copyscape Plagiarism Software