IOS 上传图片到ASP.NET
欢迎进入.NET社区论坛,与300万技术人员互动交流 >>进入
ASP.NET服务端的代码:
[csharp]
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. }
【责编:peter】
0
0