fileupload.cs

(开头部分) 3KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.IO;

// 下载于www.51aspx.com
namespace Wmj 
{ 
    public class MyUpload 
    { 
        private System.Web.HttpPostedFile postedFile=null; 
        private string savePath=""; 
        private string extension=""; 
        private int fileLength=0; 
        /*显示该组件使用的参数信息 
        public string Help 
        { 
            get
            { 
                string helpstring; 
                helpstring="<font size=3>MyUpload myUpload=new MyUpload(); //构造函数"; 
                helpstring+="myUpload.PostedFile=file1.PostedFile;//设置要上传的文件"; 
                helpstring+="myUpload.SavePath="e:\+";//设置要上传到服务器的路径,默认c:\"; 
                helpstring+="myUpload.FileLength=10000; //设置上传文件的最大长度,单位k,默认1k"; 
                helpstring+="myUpload.Extension="doc";设置上传文件的扩展名,默认txt"; 
                helpstring+="label1.Text=myUpload.Upload();//开始上传,并显示上传结果</font>"; 
                helpstring+="<font size=3 color=red>Design By WengMingJun 2001-12-12 All Right Reserved!</font>"; 
                return helpstring; 
           } 
        } */
        public System.Web.HttpPostedFile PostedFile 
        { 
            get 
            { 
                return postedFile; 
            } 
            set 
            { 
                postedFile=value; 
            } 
        } 
        public string SavePath 
        { 
            get 
            {
                if (savePath != "") return savePath; 
                return "c:\\"; 
            } 
            set 
            { 
                savePath=value; 
            } 
        } 
        public int FileLength 
        { 
            get 
            { 
                if(fileLength!=0) return fileLength; 
                return 1024; 
            } 
            set 
            { 
后面还有 51 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。