Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

Asp.NetÎļþÏÂÔØ·½·¨¡¡²Î¿¼

Asp.NetÏÂÔØ·½·¨¡¡²Î¿¼
(1)    Ê×ÏÈ×ö³ÉÏÂÔØÎļþ¡£
¡£¡£¡£ ¡£¡£¡£
 
(2)    ×ö³ÉÏÂÔØÎļþµÄ·¾¶ÒÔ¼°ÎļþÃûÓÃsession´«µÝ¸ø´ò¿ªÒ³Ãæ
Session["FILE_PATH"] =  Â·¾¶ + "DownLoadFile.txt";
Session["FILE_NAME"] = "DownLoadFile.txt";
 
(3)    ´ò¿ªÐ´°Ì壨д°ÌåÓÃÓÚ³öÁ¦ÏÂÔØÎļþ£¬´°ÌåÎÞÐèÌí¼ÓÈκÎHtml£©
System.Web.UI.ScriptManager.RegisterStartupScript(Page,
                this.GetType(),
                "open",               
                "window.open('Download.aspx',null,'toolbar=0,location=no,directories=0,"  + "status=0,scrollbars=no,width=1px,height=1px');", true);
¡ù×¢Òâ ÓÃÓÚ´ò¿ªÐ´°ÌåµÄ°´Å¥²»Òª·Åµ½UpdatePannel¿Ø¼þÖУ¨»òÕßÉèÖóöÁ¦°´Å¥¿Ø¼þÊôÐÔ¿ÉÒÔÌá½»È«Ò³Ãæ£©
 
(4)    д°ÌåÖУ¨Download.aspx£©
д°ÌåÖ±½ÓÔÚPage_loadÖмÓÈë´úÂë
¸ù¾Ýǰ»­Ãæ´«µÝÀ´µÄsessionÖµÀ´¶¨Î»Îļþ£¬³öÁ¦
   protected void Page_Load(object sender, EventArgs e)
    {
        string strFilePath = Session["FILE_PATH"].ToString();
        string strFileName = Session["FILE_NAME"].ToString();
        Response.AppendHeader("Content-Transfer-Encoding", "base64");
        Response.ContentType = "application/octet-stream";
Response.AddHeader("Content-Disposition", "attachment; filename=" + HttpUtility.UrlEncode(strFileName));
        Response.Flush();
        Response.WriteFile(strFilePath);
        Response.End();
    }


Ïà¹ØÎĵµ£º

asp.net ¿Í»§¶Ë»º´æ(ClientCaching)

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
StartClientCaching();
......

¡¾×ªÌù¡¿ASP.NETË¢ÐÂÒ³ÃæµÄÁùÖÖ·½·¨

Ô­Îijö´¦£ºhttp://www.cnblogs.com/raymond19840709/archive/2007/09/11/890045.html
×÷Õߣº´ó¿Ú×Ð
µÚÒ»£º 
private void Button1_Click( object sender, System.EventArgs e )   

    Response.Redirect( Request.Url.ToSt ......

asp.netÕ¾µãURLRewriteС¼Ç

asp.netµÄµ×²ãÔË×÷ÒѾ­Ò²ÂÒ̸¹ýÒ»·¬£¬ ½ñÌì¼ÇÒ»ÏÂURLRewriteµÄ·½·¨¡£
IISÊÕµ½ÇëÇó-->ISAPIÓÃÓÚ´¦Àí¸ÃÇëÇó-->BeginRequest¿ªÊ¼-->EndRequest½áÊø-->Êä³öResponse
ÖмäÓкöàÆäËüµÄÁ÷³Ì¾Í²»±ê¼ÇÁË£¬ÕâÀïÖ»ÊÇÁгöURLRewriteËù×ßµÄÁ÷³Ì¡£
Æäʵ¾ÍÊÇÔÚBeginRequestʼþÖе÷ÓÃHttpContextµÄRewritePath·½·¨£¬½«¸ÃÇë ......

ASP.NET»ù±¾·Ö²¼Ê½»º´æMemcached²âÊÔʵÀý

±¾ÎÄÊ×·¢£ºhttp://www.xueit.com/html/2009-11-12/21-932220455859.html
ÏÂÃæ²âÊÔÏ·ֲ¼Ê½»º´æMemcachedÈí¼þ£¬Ò»Ö±ÔÚѧϰ¹Ø×¢´ó·ÃÎÊÁ¿ÍøÕ¾µÄ»º´æÊÇÈçºÎʵÏÖ£¬Ö®Ç°¿´¹ýMemcachedµÄ×ÊÁÏ£¬Ã¦ÓÚûÓÐʱ¼äÀ´ÕæÕý²âÊÔһϣ¬±¾ÎIJâÊÔ·Ö²¼Ê½»º´æMemcachedµÄ»·¾³ÈçÏ£º£¨Á½Ì¨µçÄÔ×÷Ϊ·þÎñÆ÷£©
µÚһ̨£º
CPU:Inter£¨R£© Pentium£¨R£ ......

ASP.NETÖзÀÖ¹Ò³Ãæ¶à´ÎÌá½»µÄ´úÂëʵÏÖ

Button±»µã»÷ºódisableµô¸ÃÒ³ÃæÖÐËùÓеÄButton£¬´Ó¶ø·ÀÖ¹Ìá½»ÑÓʱµ¼ÖµĶà´ÎÌá½»¡£»ùÓÚ֮ǰµÄonceclickbutton½Å±¾.
//ASP.NETÖзÀÖ¹Ò³Ãæ¶à´ÎÌá½»µÄ´úÂë:javascript< script language="javascript"> < !-- function disableOtherSubmit() {
var obj = event.srcElement;
var objs = document.getElementsByTag ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ