string Paths = Server.MapPath("~") + "\\StudentImage\\" + FuImage.FileName;
FuImage.SaveAs(Paths);
...
student._St_Image = Paths;
这么写,上传后数据库里保存的是: D:\系统\新建文件夹\源文件\Training\Web\StudentImage\112.JPG
我想要的路径是: ~\StudentImage\112.JPG
string Paths = Server.MapPath("~") + "\\StudentImage\\" + FuImage.FileName;
FuImage.SaveAs(Paths); (StudentImage是文件夹名)
这段代买该怎么改,或是其他该怎么改
FuImage.SaveAs(Paths);
...
student._St_Image = Paths;
这么写,上传后数据库里保存的是: D:\系统\新建文件夹\源文件\Training\Web\StudentImage\112.JPG
我想要的路径是: ~\StudentImage\112.JPG
string Paths = Server.MapPath("~") + "\\StudentImage\\" + FuImage.FileName;
FuImage.SaveAs(Paths); (StudentImage是文件夹名)
这段代买该怎么改,或是其他该怎么改
解决方案 »
- 如何打印gridview 里指定行 的数据
- ASP.NET中OpenFileDialog和FloderBroswerDialog的使用问题
- asp.net 问题
- ASP.NET下载文件,文件名乱码.
- 新年好,向高手请教DATAVIEW初级问题,在线等100分相送
- 安装crystalreport10后出现的问题
- asp.net获取Listbox值的问题
- ASP网站制作问题急
- 我的ASP.NET State Service服务启动不了了,为什么
- 初学者问.NET中DATAGRID如何分页
- FlexPaper 滚动条 问题
- 未能找到路径“C:\Users\Administrator\Desktop\导数据测试.xls”的一部分
FuImage.SaveAs(Paths);
student._St_Image = "~/StudentImage/" + FuImage.FileName;