对于在asp.net里设置文件上传控件,没有直接的web窗体控件,要到html里找file field
但这个控件无法在事件中起到任何作用,
方法是在设计中右击,把它设置成 作为服务器控件运行 ,这样它就可以有它该有的属性和作用了。。。
dim fileto as string =system.io.path.getfilename(fileup.postedfile.filename).tostring
fileup.postedfile.saveas(configurationsettings.appsettings("file_upload")+fileto)
其中fileto指文件的来源地址,fileup是上传控件
configurationsettings.appsettings("file_upload")是指目标地址,它已经在web.config里已申明