Common/MyUpload.cs

(开头部分) 14KB

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


using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Text;
using System.IO;
/// <summary>
/// MyUpload 的摘要说明
/// </summary>
public class MyUpload
{
    public MyUpload()
    {
        //
        // TODO: 在此处添加构造函数逻辑
        //
    }

    private System.Web.HttpPostedFile postedFile = null;
    private string savePath = "";
    private string extension = "";
    private int fileLength = 0;
    private string setfilenme = "";
    //显示该组件使用的参数信息
    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=100; //设置上传文件的最大长度,单位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;
        }
    }

后面还有 420 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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