(·Â163)Asp.Net¶à¸½¼þÉÏ´« [תÌù]
¶ÔÓÚasp.net³ÌÐò£¬ÎÒÃÇÓ¦¸Ã¾¡¿ÉÄܵÄÌṩһ¸ö±ã½ÝµÄÓû§½Ó¿Ú£¬¼õÉÙÒ³Ãæ»Ø´«¾ÍÊÇÆäÖÐÖ®Ò»¡£
±¾ÎÄÑÝʾһ´ÎÉÏ´«¶à¸öÎļþµÄ·½·¨£¬ÔÚ¿Í»§¶Ë¿ÉÒÔËæÒâ¿ØÖÆÉÏ´«ÎļþµÄ¸öÊý£¬µ«ÊÇ×¢Òâ×ÜÎļþ´óС²»Äܹý´ó£¬·ñÔò»áÓÐÒì³£Å׳ö¡£ÖÁÓÚ½â¾ö´óÎļþÉÏ´«µÄ·½·¨ÒѾ³¬³ö±¾ÎĵÄÌÖÂÛ·¶Î§¡£
<×¢£º´ó¸½¼þ°ì·¨>
<
<configuration>
<system.web>
<httpRuntime maxRequestLength="10000"
useFullyQualifiedRedirectUrl="true"
executionTimeout="45"/>
</system.web>
</configuration>
ÐèÒª½«machine.config»òweb.configÖеÄ<httpRuntime> sectionµÄmaxRequestLengthÖµ×÷ÏàÓ¦µÄÐÞ¸Ä.
>
ÕâÀïÓÐÒ»¸öÒªµã´ó¼Ò²»ÒªºöÂÔÁË£¬·ñÔò³ÌÐò²»ÄÜÕý³£¹¤×÷¡£
¾ÍÊDZØÐëÖ¸¶¨formµÄenctype="multipart/form-data" ÊôÐÔ
´úÂëÈçÏ£º
<%@ Page language="c#"
Codebehind="MultiAttchments.aspx.cs" AutoEventWireup="false"
Inherits="WebApplication3.MultiAttchments" %><!DOCTYPE HTML
PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" ><HTML>
<HEAD>
<script>
function AddAttachments()
{
document.getElementById('attach').innerText
Ïà¹ØÎĵµ£º
/// <summary>
/// HTML½âÂë
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
public string HtmlDecode(string input)
&nb ......
½ñÌìÑо¿ÁËÒ»ÏÂÔÚasp.netÏÂÓÃC#ÓïÑÔѹËõÎļþ£¬ºÍ½âѹÎļþ£¬ÔÚÍøÉϺÃÁ˺þòÅÕÒµ½Ô´´úÂ룬£¬Õæ²»ÈÝÒ×°¡£¡£¡
ÔÚ ASP.NET ÖÐÓÐÁ½¸öÀࣺDeflateStream ºÍ GZipStream ÓÃÓÚ´¦ÀíѹËõºÍ½âѹËõ£¬ÕâÁ½¸öÀà·Ö±ðʹÓõÄÊÇ DEFLATE ºÍ gzip ѹËõËã·¨£¬ÕâÁ½¸öËã·¨±»Ò»Ð©Ñ¹ËõÈí¼þÖ§³Ö£¬±ÈÈç WinRAR ¾ÍÖ§³Ö gzip¡£ÕâÁ½¸öÀàµÄÃû³Æ¿Õ¼ä¾ùΪ£ ......
¹ØÓÚÊý¾Ý´¦ÀíÏà¹ØµÄÓÅ»¯
Ò»¡¢ SqlDataReadºÍDatasetµÄÑ¡Ôñ
SqldatareadÓŵ㣺¶ÁÈ¡Êý¾Ý·Ç³£¿ì¡£Èç¹û¶Ô·µ»ØµÄÊý¾Ý²»Ðè×ö´óÁ¿´¦ÀíµÄÇé¿öÏ£ ......
ÕâÀïÎÒֻժȡÁËÔÎĵÄCodeÒÔ¹©Ç±ÐÄÑо¿.using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Configuration;
using System.Data.SqlClient;
using System.Web.Security;
using System.Data;
public ......