Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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();
    }


Ïà¹ØÎĵµ£º

dz̸ASP.net°²È«±à³Ì

ÔÚWeb±à³Ì¹ý³ÌÖУ¬´æÔÚןܶలȫÒþ»¼¡£±ÈÈçÔÚÒÔǰµÄASP°æ±¾ÖУ¬CookieΪ·ÃÎÊÕߺͱà³ÌÕß¶¼ÌṩÁË·½±ã£¬²¢Ã»ÓÐÌṩ¼ÓÃܵŦÄÜ¡£´ò¿ªIEä¯ÀÀÆ÷£¬Ñ¡Ôñ“¹¤¾ß”²Ëµ¥ÀïµÄ“InternetÑ¡Ï¬È»ºóÔÚµ¯³öµÄ¶Ô»°¿òÀïµ¥»÷“ÉèÖÔ°´Å¥£¬Ñ¡Ôñ“²é¿´Îļþ”°´Å¥£¬ÔÚµ¯³öµÄ´°¿ÚÖУ¬¾Í»áÏÔʾӲÅÌÀï ......

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();
......

130µÀasp.netÃæÊÔÌ⣬ÓÐЩ×Ô¼ºµÄÐĵúÍÀ§»ó£¨¶þ£©

69.ÏÂÃæÕâ¶Î´úÂëÊä³öʲô£¿ÎªÊ²Ã´£¿
int i=5;
int j=5;
if (object.referenceequals(i,j))
console.writeline("equal");
else
console.writeline("not equal");
´ð£º²»ÏàµÈ£¬ÒòΪ±È½ÏµÄÊǶÔÏó
70.ʲô½Ð×ösql×¢È룬ÈçºÎ·ÀÖ¹£¿Çë¾ÙÀý˵Ã÷¡£
´ð£ºÀûÓÃsql¹Ø¼ü×Ö¶ÔÍøÕ¾½øÐй¥»÷¡£¹ýÂ˹ؼü×Ö'µÈ
71.ʲôÊÇ·´É䣿
´ð£º ......

¡¾×ªÌù¡¿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 IIS ×¢²á¹¤¾ß (Aspnet_regiis.exe)

ASP.NET IIS ×¢²á¹¤¾ß (Aspnet_regiis.exe)
ÔÚһ̨¼ÆËã»úÉϲ¢ÐÐÖ´Ðжà¸ö .NET Framework °æ±¾Ê±£¬Ó³Éäµ½ ASP.NET Ó¦ÓóÌÐòµÄ ASP.NET ISAPI °æ±¾¾ö¶¨Á˸ÃÓ¦ÓóÌÐòËùʹÓõĹ«¹²ÓïÑÔÔËÐпâ (CLR) °æ±¾¡£Ê¹Óà ASP.NET IIS ×¢²á¹¤¾ß (Aspnet_regiis.exe)£¬¹ÜÀíÔ±»ò°²×°³ÌÐò¿ÉÒÔ·½±ãµØ¸üРASP.NET Ó¦ÓóÌÐòµÄ½Å±¾Ó³É䣬ʹÆäÖ¸Ï ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ