(·Â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
Ïà¹ØÎĵµ£º
½ñÌìÑо¿ÁËÒ»ÏÂÔÚasp.netÏÂÓÃC#ÓïÑÔѹËõÎļþ£¬ºÍ½âѹÎļþ£¬ÔÚÍøÉϺÃÁ˺þòÅÕÒµ½Ô´´úÂ룬£¬Õæ²»ÈÝÒ×°¡£¡£¡
ÔÚ ASP.NET ÖÐÓÐÁ½¸öÀࣺDeflateStream ºÍ GZipStream ÓÃÓÚ´¦ÀíѹËõºÍ½âѹËõ£¬ÕâÁ½¸öÀà·Ö±ðʹÓõÄÊÇ DEFLATE ºÍ gzip ѹËõËã·¨£¬ÕâÁ½¸öËã·¨±»Ò»Ð©Ñ¹ËõÈí¼þÖ§³Ö£¬±ÈÈç WinRAR ¾ÍÖ§³Ö gzip¡£ÕâÁ½¸öÀàµÄÃû³Æ¿Õ¼ä¾ùΪ£ ......
Web.configÎļþÊÇÒ»¸ö±ê×¼µÄXMLÎĵµ£¬ËùÓеÄÅäÖÃÐÅÏ¢¶¼Î»ÓÚ<configuration>±ê¼ÇÄÚ¡£<system.web>±ê¼ÇÄÚÔò°üº¬Á˺ËÐÄASP.NETÅäÖÃÉèÖá£Óû§¿ÉÒÔÔÚVisual Studio.NETÖдò¿ªWeb.configÀ´²é¿´ºÍ±à¼ËüµÄÄÚÈÝ£¬Õâ¸öÎļþÖаüº¬ÁË´óÁ¿µÄ×¢ÊÍÐÅÏ¢£¬Óû§¿ÉÒÔ²ÎÕÕѧϰ¡£ÏÂÃæ½éÉܼ¸¸ö³£Óõıê¼Ç¡£
1. <appSettings> ......
1.
ClientScript.RegisterStartupScript(this.GetType(), "js1", "alert('ɾ³ý³É¹¦');window.location='QuerySortList.aspx';", true);
2.
this.cmdSave.Attributes.Add("onclick", "return f_StringCheck()"); ......
1.asp.netºô½Ðjs
view
plain
copy
to clipboard
print
?
Response.Write("<mce:script language=javascript><!--
");
Response.Write("alert('Ȧ ');"
);
Response.Write("location.href='login.aspx';"
)& ......
·½·¨Ò»£ºÊ¹ÓÃInitParameters
´«µÝ²ÎÊýÒ³Ãæ:
´«µÝÒ»¸ö²ÎÊý
string url = "index.aspx?UserID=" +userId;
//×î´ó»¯
string refUrl = "<Script>window.self.open('" + url + "', '', 'fullscreen=yes,scrollbar=no,toolba ......