fileupload 获取图片大小

        string fullname = FileUpload.PostedFile.FileName;
        long filesize = FileUpload.PostedFile.ContentLength;//获取图片大小
        FileInfo fi = new FileInfo(fullname);
        string name = DateTime.Now.ToFileTime().ToString();
        string type = fi.Extension;

你可能感兴趣的:(c#)