易截截图软件、单文件、免安装、纯绿色、仅160KB

使用ASP.NET上传多个文件到服务器

在Email系统中经常会上传多个文件到服务器,用户大多习惯一次上传所有的文件,而不是逐个上传,我们可以使用javascript动态地添加file元素到表单,然后在服务器端处理这些file
效果图如下:
页面代码MutlileFileUpload.aspx如下:
view plaincopy to clipboardprint?
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="MutlileFileUpload.aspx.cs" Inherits="MutlileFileUpload"%> 
 
<!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> 
    <title>多文件上传到服务器Demo</title> 
    <link href="css/writemail.css" mce_href="css/writemail.css" rel="stylesheet" type="text/css" /> 
    <mce:script type="text/javascript"><!--  
        var MAXFILES = 5;  
        //文件计数器  
        var fileCount = 0;  
        function addAttach(noAlert) {  
            if (fileCount >= MAXFILES && !noAlert) {  
                alert("最多只能添加" + MAXFILES + "个附件!");  
                return;  
            }  
 
            var fileSectionDiv = document.getElementById("files");  
            var fileItemDiv = document.createElement("div");  
      &


相关文档:

浅谈ASP.net安全编程

在Web编程过程中,存在着很多安全隐患。比如在以前的ASP版本中,Cookie为访问者和编程者都提供了方便,并没有提供加密的功能。打开IE浏览器,选择“工具”菜单里的“Internet选项”,然后在弹出的对话框里单击“设置”按钮,选择“查看文件”按钮,在弹出的窗口中,就会显示硬盘里 ......

Oracle支撑的asp.net2.0应用中自主实现数据依赖缓存

项目中有一些报表,本身速度就不太快,遇到数据量大的情况,更是让人抓狂,用户也提出了报表速度慢的问题,于是想着如何实现报表的数据依赖缓存,即将报表数据缓存,当数据发生改变时,再重新获取数据。
最简单的方法,是在显示报表的aspx页面第一行加上形如<%@ OutputCache Duration="600" VaryByParam="some_par ......

asp.net(c#) 制作注册码程序

1、定义CS类 using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Web.Configuration;
using Hash ......

ASP.NET中常用的三十三种代码

1. 打开新的窗口并传送参数 [返回目录]
传送参数: 
response.write("<script>window.open('*.aspx?id="+this.DropDownList1.SelectIndex+"&id1="+...+"')</script>") 
接收参数: 
string a = Request.QueryString("id"); 
string b = Request.QueryString("id1"); 
2.为按钮 ......

asp.net 2.0 怎样对label进行绑定

问题描述:
数据库A表中:
ID    Name
1    小明
2    小强
3    小张
4    小李
5    小关
...
分别有Label1,Label2... Label5 五个标签,怎么让这五个标签Text绑定显示A表Name列的前5个,就是说Label1显示小明,Label2显示小强... 
......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号