学习笔记29_MVC异步上传图片
2024-10-06 16:09:10
前台
<script type="text/javastript">
$(fuction(){
$("#btnsub").click(fuction(){
$("#frm").ajaxSubmit({
url:"/Ajax/ProcessImgUpLoad",
type:"Post",
success: fuction(){.....}
});
});
})
</...>
<from name="from1" enctype= "mulipart/form-data">
<input type="file" name="imageFile"/>
<input type = "submit" value="上传"/>
</from>
后台
pulic ActionResult ProcessImageUpLoad()
{
var file = Request.File["imageFile"];
string path = "/upload/"+file.FileName;
file.SaveAs(Request.Math(Path));
return Content("OK");
}
最新文章
- Java集合类的总结
- sticky组件的改进实现
- vim一些常用的快捷键
- android 布局优化常用技巧
- String详解, String和CharSequence区别, StringBuilder和StringBuffer的区别 (String系列之1)
- jquery选择器(原创)<;四>;
- LightOj 1098 - A New Function(求1-n所有数的因子和)
- 关于在windows下使用mingw并行编译wxwidgets时的错误
- plsql登录弹白框
- .NET世界各成员之间的关系
- [LeetCode]题解(python):108-Convert Sorted Array to Binary Search Tree
- iOS 之UICollectionView 之原理介绍
- poj2528 线段树+离散化 (倒序)
- Android异常分析(转)
- Google官方网络框架-Volley的使用解析Json以及加载网络图片方法
- FMC
- python提取文件中的方法名称
- .Net 读取配置文件 xml
- Head First Servlets &; JSP 学习笔记 第七章 —— 作为JSP
- Spring配置文件中的那些标签意味着什么(持续更新)