前段时候在www.codeproject.com上看到一个文件上传的控件,觉得很好,共享大家。

本控件特点:
1).可以指定特定类型的文件,只能选择特定类型的文件,类似于WinForm中的OpenFileDialog的Filter(*.bmp;*.jpg;*.jpeg;*.gif)
2).可以同时选择多个文件,每个文件都有一个进度条,显示上传的进度
下面是运行时的截图:
Flash 文件上传控件(附源码)_8384
点击下载源码:
附件: 亲,您没有权限下载或查看附件喔:-) 试试登录注册吧!
TOP

回复: Flash 文件上传控件(附源码)

怎么权限不够,如何下载?
TOP

回复:Flash 文件上传控件(附源码)

这个控件如何自定义上传目录 和如何把按钮改成中文
TOP

回复:Flash 文件上传控件(附源码)

事件??
TOP

回复:Flash 文件上传控件(附源码)

如果按钮是中文的这个控件就是完美的了 可惜无法更改
TOP

回复:Flash 文件上传控件(附源码)

能具体说下在哪里改上传路径吗
TOP

回复:Flash 文件上传控件(附源码)

如何控制点击上传哪个事件啊
TOP

回复:Flash 文件上传控件(附源码)

说实话这个我完全没看懂怎么用
TOP

回复:Flash 文件上传控件(附源码)

protected void Page_Load(object sender, EventArgs e)
    {
        // example of forms based authentication
        // check if user is authenticated because all files in folder are marked to allow
        // anonymous access (see web.config in UploadPage folder).  This is because of
        // the flash bug that does not send cookies set in non IE browswers
        if (!User.Identity.IsAuthenticated)
        {
            FormsAuthentication.RedirectToLoginPage();
            return;
        }
        // allows the javascript function to do a postback and call the onClick method
        // associated with the linkButton LinkButton1.
        string jscript = "function UploadComplete(){" + ClientScript.GetPostBackEventReference(LinkButton1, "") + "};";
        Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "FileCompleteUpload", jscript, true);

        // Adds query string info to the upload page
        // you can also do something like:
        // we UrlEncode it because of how LoadVars works with flash,
        // we want a string to show up like this 'CategoryID=3&UserID=4' in
        // the uploadPage variable in flash.  If we passed this string without
        // UrlEncode then flash would take UserID as a seperate LoadVar variable
        // instead of passing it into the uploadPage variable.
        // then in the httpHandler we get the CategoryID and UserID values from
        // the query string. See Upload.cs in App_Code
        //flashUpload.QueryParameters = "categoryId=14"; // Server.UrlEncode(Request.QueryString.ToString());

        // example use of cookieless sessions (flash does not send cookies set in non IE browswers
        Session["temp"] = "hi";
       
        // sends the identity of the user to the upload page using query string parameters. Used with forms authtication.
        FormsIdentity cIdentity = User.Identity as FormsIdentity;
        string encryptString = FormsAuthentication.Encrypt(cIdentity.Ticket);
        flashUpload.QueryParameters = string.Format("User={0}", encryptString);       
    }

    protected void LinkButton1_Click(object sender, EventArgs e)
    {
        // Do something that needs to be done such as refresh a gridView
        // say you had a gridView control called gvMyGrid displaying all
        // the files uploaded. Refresh the data by doing a databind here.
        // gvMyGrid.DataBind();
    }
完全没明白怎么用的
TOP

回复:Flash 文件上传控件(附源码)

不会出现啊
TOP