简介:
abortion pill over the counter Ph
abortion pill online philippines
read abortion pill price ph
lexapro side effects weight gain
lexapro side effects
skin nifedipine grossesse
acheter nifedipine
lexapro side effects mayo clinic
lexapro side effects
in children
amoxicillin price without prescription
buy amoxicillin from canada
danielharris.co.uk buy amoxicillin canada
lexapro and weed effects
lexapro and weed
benadryl and pregnancy second trimester
benadryl
and pregnancy
buy mifeprex abortion pill online
buy abortion pill
cheap abortion clinics in atlanta
cheap abortion clinics in dallas tx
open cialis pillola del weekend
cialis generico
online cialis generico 5 mg
cialis generico
pillola cialis prezzo
tadalafil
sandoz mirtazapine and alcohol death
mirtazapine
reviews amlodipin actavis
amlodipin
teva benadryl and pregnancy nausea
benadryl and
pregnancy cialis generico in italia
cialis generico in farmacia senza
ricetta augmentin sciroppo
augmentin
prezzo zoloft and weed reddit
zoloft and weed
go prednisolone
prednisolon bivirkninger og alkohol
redirect low dose naltrexone pharmacy
naltrexone generic cost
read here
1、只有.Net Framework 4.5才支持,所以要设置项目或网站目标Framework为4.5。
2、添加一个FileUpload控件,其ID为FileUpload1,设置FileUpload1的AllowMultiple属性为True;
3、添加一个按钮,其ID为Button1,Text属性修改为“上传”;
4、添加一个Literial,其ID为Literial1,用于显示上传结果;
5、在网站下添加一个文件夹Upload,用于保存上传的文件;
代码:
protected void Button1_Click(object sender, EventArgs e)
{
String saveDir = @"\FileUploads\Upload\";
//String saveDir= "\\FileUploads\\Upload\\";
String appPath = Request.PhysicalApplicationPath;
System.Text.StringBuilder myLabel = new System.Text.StringBuilder();
String fileName, savePath;
foreach (HttpPostedFile postedFile in FileUpload1.PostedFiles)
{
fileName = postedFile.FileName;
savePath = appPath + saveDir + fileName;
postedFile.SaveAs(savePath);
myLabel.Append("<br>文件名---- " + fileName);
}
Literal1.Text = "上传成功" + myLabel.ToString();
}
6、测试效果:点击“选择文件”,按Ctrl键选中多个文件;

7、点击“上传”完成文件上传,在页面显示上传的文件名。
