如何在asyncfileupload控件中获取文件路径? [英] How to get a file path in asyncfileupload control?

查看:83
本文介绍了如何在asyncfileupload控件中获取文件路径?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在d:\\sample.doc中有doc文件



现在我想从asyncfileupload控件获取该路径



怎么办?请帮帮我...

i have the doc file in d:\\sample.doc

now i want get that path from asyncfileupload control

how to do is? please help me...

推荐答案

试试这个

Try this
protected void ProcessUpload(object sender, AjaxControlToolkit.AsyncFileUploadEventArgs e)
{
    string name = System.IO.Path.GetFileName(e.filename);
    string dir = Server.MapPath("upload_excel/");
    string path = Path.Combine(dir, name);
    venfileupld.SaveAs(path);
    writetodb(path);
}





希望这有帮助



Hope this helps


这篇关于如何在asyncfileupload控件中获取文件路径?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆