.net MVC借助Iframe实现无刷新上传文件
html:
<div id="uploadwindow" style="display: none;">
<form action="/ShopActivitys/ImportActivityItems" id="form1" name="form1" enctype="multipart/form-data" method="post" target="hidden_frame">
<table style="width: 300px;">
<tr>
<td style="width: 80px; display: block;">选择文件:</td>
<td>
<input type="file" id="file" name="activityitemsfile" />
</td>
</tr>
</table>
<input type="submit" value="上传文件" />
<iframe name='hidden_frame' id="hidden_frame" style='display: none'></iframe>
</form>
</div>
CallBack函数:
var UploadFun = {
CallBack: function (msg) {
$.messager.alert('上传文件', msg, 'info'); }
};
后台处理:
public void ImportActivityItems()
{
string error = "导入成功";
try
{
var f = Request.Files["activityitemsfile"]; var fpath = Server.MapPath("/Upload/活动链接数据/");
if (!Directory.Exists(fpath))
Directory.CreateDirectory(fpath);
string fullfilename = fpath + DateTime.Now.ToFileTime() + f.FileName;
f.SaveAs(fullfilename);
}
catch (Exception ex)
{
Logger.Error(ex.ToString());
error = "导入过程中发生错误,请重试";
}
Response.Write("<script type=\"text/javascript\"> parent.UploadFun.CallBack(\"" + error + "\")</script>");
}
细节问题:
file控件是否有值:
if ($("#file").val())
$("#submitform").trigger("click");
else
$.messager.alert('上传文件', '请选择文件', 'info');
提交表单数据后表单的重置(注意如果包含多个表单请注意索引的顺序):
$('#shoppriceform1')[0].reset(),js原生态的写法document.forms[0].reset();
在单个页面构建导入弹窗时,页面的内容一般是动态创建的,以前是利用easyui 中datagrid的href加载一个页面,现在直接在本页面构建Html内容,
在单个页面构建html的问题就是给弹窗的Content赋值以后 原来的HTML还在,出现两个ID相同的元素导致定位失败
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAbgAAADgCAIAAAD+AuTKAAAbUElEQVR4nO3de1xUdf7H8VO/fWg3hy4q24Xa+BnmIjttlJuau21SaEkttVtZwQS7/SodiG2FERhL+5kKBqQwYOm2umT62xBBYiWHxLiqICoiicglpWFmuAkzDBex8/vjzBzPzDkzX5TVMwfez8fn4WPmzJnhzMi8PGdmBKodAAB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j++++/++67xsZGo9HY5Qb0ev2ZM2eKi4vr6urGwAYjlABjhE6nq6qqKioq0rqBoqKiqqoqnU43NjYYoQQAIEAoAQAIEEoAAAKEEgCAAKEEACCQQCgxGAxG9HHrUGIwGIwbDkKJwWAwhBEzlJsLDaf1F0V/CDAYDMbFnNINby40iBbKrIMdFQ39oj8KGAwG42LKT/dnHewQLZQ1Td1bi4xnjD+J/kBgMBiM4Jwx/rS1yFjT1C1aKNvb24tquj4vMlY09OMYHIPBuNWc0g2Xn+7fWmT8tqbr6lVyRKFsb28/2WTcXaHfUij+BwIwGAyGnS2Fbbsr9CebjFe1kiMNJQDAeIZQAgAQIJQAAAQIJQAAAUIJAECAUAIAECCUAAAECCUAAAFCCQBAgFACABAglAAABP8PyPZMdl7blZ8AAAAASUVORK5CYII=" alt="" />
.net MVC借助Iframe实现无刷新上传文件的更多相关文章
- spring mvc + xmlHttpRequest2.0 实现无刷新上传文件,带进度条和剩余时间
1.springmvc支持文件上传,需要在spring-mvc.xml配置文件中加上下面的一段话: <!-- 支持上传文件 --> <bean id="multipartR ...
- ajax +jsp+iframe无刷新上传文件[转]
http://hi.baidu.com/zj360202/blog/item/f23e3711f929c774cb80c475.html ajax jsp 无刷新上传文件 2009-10-26 16: ...
- web 开发之js---巧用iframe实现jsp无刷新上传文件
首先要说的就是 ajax 是无法实现上传文件的,可以想一下ajax与后台通信都是通过传递字符串,怎么能传递文件呢?其实出于安全考虑js是不能操作文件的,所以就不要再说用ajax来实现文件的上传了,这是 ...
- $_FILES参数详解及简单<form>表单无刷新上传文件
$_FILES:经由 HTTP POST 文件上传而提交至脚本的变量,类似于旧数组$HTTP_POST_FILES 数组(依然有效,但反对使用)详细信息可参阅 POST方法上传 $_FILES数组内容 ...
- jquery ajax php 无刷新上传文件 带 遮罩 进度条 效果的哟
在很多项目中都会叫用户上传东西这些的,自从接触了jquery 和ajax之后就不管做什么,首先都会想到这个,我这个人呢?是比较重视客户体验的,这次我这边负责的是后台板块,然后就有一块是要求用户上传照片 ...
- jQuery+php+ajax实现无刷新上传文件功能
jQuery+php+ajax实现无刷新上传文件功能,还带有上传进度条动画效果,支持图片.视频等大文件上传. js代码 <script type='text/javascript' src='j ...
- [Asp.net mvc]jquery.form.js无刷新上传
写在前面 最近在自己的网盘项目中想用ajax.beginform的方式做无刷新的操作,提交表单什么的都可以,但针对文件上传,就是个鸡肋.在网上查找了发现很多人都遇到了这个问题,大部分都推荐使用jque ...
- Ajax 无刷新上传文件插件 uploadify 的使用
在表单中无法直接使用 Ajax 上传文件,解决的思路可以是使用插件无刷新地上传文件,返回文件上传后的地址,然后把该地址作为 Ajax 的参数传递给服务器端进行数据库处理.可以使用 uploadify ...
- ajax无刷新上传文件
网页上传文件最简单的方式就是通过表单上传了,但是在提交表单的时候会导致网页刷新,但有的时候我们不想网页刷新,有什么办法呢,我们可以使用ajax上传文件来做到这一点.只有ajax还不行,还需要JavaS ...
随机推荐
- CSS 简介
CSS 简介 需要具备的基础知识 在继续学习之前,你需要对下面的知识有基本的了解: HTML XHTML CSS 概述 CSS 指层叠样式表 (Cascading Style Sheets) 样式定义 ...
- Tomcat编码问题及访问软链接文件设置
Tomcat编码问题及访问软链接文件设置 一.编码问题:让其支持UTF-8格式 修改tomcat中server.xml Connector port=" protocol="org ...
- sublime设置
修改字体: "font_face": "Monaco", "font_size": 14.0
- redis使用watch完成秒杀抢购功能(转)
redis使用watch完成秒杀抢购功能: 使用redis中两个key完成秒杀抢购功能,mywatchkey用于存储抢购数量和mywatchlist用户存储抢购列表. 它的优点如下: 1. 首先选用内 ...
- XMLBEANS的使用总结
在本文中,我们将详细了解最好的数据对象XMLBean.从传统角度来说,在Java应用程序中使用XML,就是在从 XML文档向Java导入数据的技术或从数据模型层向XML导出数据技术之间架起了一座桥梁. ...
- json的中括号和大括号的使用?
参考这篇文章: http://www.cnblogs.com/sgdkg/archive/2012/12/03/2799723.html json 变量有两种可能, 可能是一个对象, (类似 类的实例 ...
- 解决pydev无法增加jython271 interpreter的问题
============================解决pydev无法增加jython271 interpreter的问题============================ 从jython. ...
- Js设置及获取Cookie的方法
Login页面设置Cookie: <script type="text/javascript"> if(json.result=="true") { ...
- resin
http://blog.csdn.net/sea0x/article/details/6097531 resin 启动: resin 配置文件摘取: <server-default> &l ...
- AlwaysOn可用性组功能测试(三)--其他测试
三. 大数据量操作的时候发生的切换 1.对表进行大量插入,执行1千万遍,如下语句 insert into aa select * from sys.sysprocesses go 10000000 2 ...