首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 其他教程 > 操作系统 >

IOS 下传图片到ASP.NET

2013-03-06 
IOS上传图片到ASP.NETASP.NET服务端的代码:1. protected void Page_Load(object sender, EventArgs e)2. {

IOS 上传图片到ASP.NET
ASP.NET服务端的代码:

1. protected void Page_Load(object sender, EventArgs e)  2. {  3.     if (Request.Files.Count == 0)  4.     {  5.         Response.Write("none file");  6.     }  7.     else  8.     {  9.         HttpPostedFile file = Request.Files["img"];  10.         String filename = Request.Form["name"];  11.         file.SaveAs(MapPath("~/"+filename+".png"));  12.           13.         Response.Write("ok");  14.     }  15. } 

热点排行