default.aspx.cs

来自「上传的控件」· CS 代码 · 共 46 行

CS
46
字号
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.IO;
using WUSGControl.Web.Upload;

public partial class _Default : System.Web.UI.Page 
{
    protected void Page_Load(object sender, EventArgs e)
    {
        //UploadFileControl1.UploadButtonName = "Button1";
        //UploadFileControl1.UploadFolder = "wusg3";
       
    }
 
    //protected void Button1_Click1(object sender, EventArgs e)
    //{
    //    //创建上传目录
    //   // string uploadpath = string.Concat(Utils.GetContext().Server.MapPath("."), UploadFileControl1.UploadFolder);
    //    string uploadpath = Path.Combine(Utils.GetContext().Server.MapPath("."), "wusg");
    //    if (!Directory.Exists(uploadpath))
    //    {
    //        Directory.CreateDirectory(uploadpath);
    //    }

    //    UploadFileCollection files = UploadHelper.GetUploadFileList("wusguploadfiles");
    //    //UploadFileCollection files = UploadHelper.GetUploadFileList("files");

    //    foreach (UploadFile file in files)
    //    {
    //        file.SaveAs(file.FileName);
    //    }
    //}

    //protected void uploadprocess(object sender, EventArgs e)OnButtonClick="uploadprocess"
    //{
    //    string a = "b";
    //}
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?