【转】In ASP.NET using jQuery Uploadify upload attachment
Upload Uploadify is a JQuery plug-in, achieve the effect is very good, with progress display. Uploadify official website:http://www.uploadify.com/, methods used in the MVC can consult in ASP.NET jQuery Uploadify MVC3 and Asp.net Mvc implementation used uploadify in save the picture zoom .
This article is a simple introduction Demo, mainly dynamic method of passing parameters through FormData additional form data passed to the handler:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<link href="uploadify/uploadify.css" type="text/css" rel="Stylesheet" />
<script type="text/javascript" src="uploadify/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="uploadify/swfobject.js"></script>
<script type="text/javascript" src="uploadify/jquery.uploadify.min.js"></script>
<script type="text/javascript"> $(function () {
var taskId = "<%= TaskID %>";
var activityId = "<%= ActivityId %>";
var userId = "<%= GetCurrentLoginUser().ID %>"; $("#<%=FileUpload1.ClientID %>").uploadify(
{
'swf': 'uploadify/uploadify.swf',
'uploader': 'UploadHandler.aspx',
'auto': false,
'method': 'post',
'multi': true,
'buttonText': '浏览',
'buttonImg': 'uploadify/browse.jpg',
'folder': '../uploadfile',
'fileDesc': '附件',
'onUploadStart': function (event, data) { //this is where you will send the form //data, but remember to get if from post in the .ashx file, by contex.Request["gallaryId"]
$("#<%=FileUpload1.ClientID %>").uploadify('settings', 'formData',
{ 'taskId': taskId, 'activityId': activityId, 'userId': userId, 'secInfo': $("#<%=ddlsecInfo.ClientID %>").val()} //note hiddenGallaryId would //have the gallaryId which im sending through post , make sure it is rendered in your page( //i.e.not concealed by a multiview control e.t.c)
);
} });
});
</script>
</head>
<body>
<form id="form1" runat="server">
<asp:FileUpload ID="FileUpload1" runat="server" />
<asp:DropDownList ID="ddlsecInfo" runat="server">
<asp:ListItem Text="公开" Value="1"> </asp:ListItem>
<asp:ListItem Text="普通" Value="2"> </asp:ListItem>
<asp:ListItem Text="机密" Value="3"> </asp:ListItem>
</asp:DropDownList>
<a href="javascript: $('#<%=FileUpload1.ClientID %>').uploadify('upload','*')">上传</a>
<a href="javascript:$('#<%=FileUpload1.ClientID %>').uploadify('cancel','*')">取消上传</a>
</form>
</body>
</html>
uploadify3.0详细使用说明
【转】In ASP.NET using jQuery Uploadify upload attachment的更多相关文章
- 使用jQuery Uploadify在ASP.NET 上传附件
Uploadify是JQuery的一个上传插件,实现的效果非常不错,带进度显示.Uploadify官方网址:http://www.uploadify.com/,在MVC中使用的方法可以参考 jQuer ...
- jquery.uploadify上传文件配置详解(asp.net mvc)
页面源码: <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" c ...
- jQuery Uploadify在ASP.NET MVC3中的使用
1.Uploadify简介 Uploadify是基于jQuery的一种上传插件,支持多文件.带进度条显示上传,在项目开发中常被使用. Uploadify官方网址:http://www.uploadif ...
- jquery file upload + asp.net 异步多文件上传
百度了很久,国内一直 找不到 使用jquery file upload 插件 +asp.net 的相关代码 一开始使用 jquery uploadify ,一款基于 flash的插件,但是不支持 Sa ...
- [Plugin] JQuery.uploadify上传文件插件的使用详解For ASP.NET
URL:http://www.cnblogs.com/xiaopin/archive/2010/01/21/1653523.html 今天下午整理文件上传的例子,感觉收集到的例子都很不人性话,后来找到 ...
- asp.net mvc 2.o 中使用JQuery.uploadify
From:http://www.cnblogs.com/strugglesMen/archive/2011/07/01/2095916.html 官方网站http://www.uploadify.co ...
- jquery.uploadify文件上传组件
1.jquery.uploadify简介 在ASP.NET中上传的控件有很多,比如.NET自带的FileUpload,以及SWFUpload,Uploadify等等,尤其后面两个控件的用户体验比较好, ...
- ASP.NET MVC 使用Uploadify实现多文件异步无刷新上传
软件技术开发,合作请联系QQ:858-048-581 这里我通过使用uploadify组件来实现异步无刷新多文件上传功能. 1.首先下载组件包uploadify,我这里使用的版本是3.1 2.下载后解 ...
- SpringMVC+jquery.uploadify 上传文件
前言 以前用Asp.net MVC+uploadify上传文件,最近学习SpringMVC,所以就用SpringMVC+uploadify做个上传文件的demo. 刚开始用form表单的方式提交,在C ...
随机推荐
- Android TV 选中高亮显示
1.开发Android TV APP, 使用遥控器选中按钮或者选着其它菜单 如果没有高亮显示,就看不出选中哪个按钮或者菜单 2.在drawable 添加 border_red.xml 设置选中高亮 & ...
- [读书笔记]-技术学习-Redis
1:Redis概览 Remote Dictionary Server 远程字典服务 Redis是基于内存的存储 在一台普通的笔记本上,Redis每秒的读取速度可以达到10万 内存读取数据,断电的时候数 ...
- iproute2常用命令
#常用命令 ip link show #显示链路 ip addr show #显示地址(或ifconfig) ip route show #显示路由(route -n) ip neigh show # ...
- (转)基于Metronic的Bootstrap开发框架经验总结(5)--Bootstrap文件上传插件File Input的使用
http://www.cnblogs.com/wuhuacong/p/4774396.html Bootstrap文件上传插件File Input是一个不错的文件上传控件,但是搜索使用到的案例不多,使 ...
- In Swift, typedef is called typealias:
It is used to create an alias name for another data type. The syntax of the typedef declaration is:[ ...
- Uoj 52. 【UR #4】元旦激光炮 神题+交互题
Code: #include "kth.h" #include<iostream> int minn(int x,int y){return x<y?x:y;}; ...
- 【转载】JSP 中EL表达式用法详解
EL 全名为Expression Language EL 语法很简单,它最大的特点就是使用上很方便.接下来介绍EL主要的语法结构: ${sessionScope.user.sex} 所有EL都是以${ ...
- C语言中时钟编程
目录 C语言中时钟编程 1. 文章目的 2.基本概念 2.1 UTC时间 2.2 UNIX纪元时间 2.3 格林威治时间 (GMT) 3.时间转换 3.1 asctime函数 3.2 ctime函数 ...
- 一个vue模拟键盘的组件
如图所示下载地址
- 15.Hibernate一对多双向关联映射+分页
1.创建如下数据库脚本 --创建用户信息表 --编号,用户名,密码,年龄,性别,昵称,手机,地址,管理员,图像地址 create table users ( id ) primary key, use ...