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

asp.netʵÏÖÎļþÏÂÔØ(wapÊÖ»úÏÂÔØ)

Õâ¸öÎÊÌâÀ§ÈÅÁËÎÒÁ½Ì죬ÊÖ»úÏÂÔØ
 protected void Page_Load(object sender, EventArgs e)
    {
        string filename = Server.UrlDecode(Request["upload"]);
        string filePath = Server.MapPath("upload/" + filename);//·¾¶
        FileDownload(filePath);
    }
/// <summary>
    /// ÎļþÏÂÔØ
    /// </summary>
    /// <param name="FullFileName"> </param>
    private void FileDownload(string FullFileName)
    {
        try
        {
            FileInfo DownloadFile = new FileInfo(FullFileName);
            if (DownloadFile.Exists)
            {
                Response.Clear();
                Response.ClearHeaders();
                Response.Buffer = false;
                //Response.ContentType = "application/octet-stream";//֪ͨä¯ÀÀÆ÷ÏÂÔØÎļþ¶ø²»ÊÇ´ò¿ª
                Response.AppendHeader("Content-Disposition", "attachment;filename=" + HttpUtility.UrlEncode(DownloadFile.FullName, System.Text.Encoding.UTF8));
                Response.AppendHeader("Content-Length", DownloadFile.Length.ToString());
    &nb


Ïà¹ØÎĵµ£º

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

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

asp.netÍøÕ¾iisÓëĿ¼ȨÏÞÉèÖÃ

ÏÞÉèÖÃÒÔWindows Server 2003ΪÀý£¬ÐéÄâÖ÷»úÓû§²»±Ø½øÐдËÏîÉèÖá£Ê×ÏÈ£¬ÎÒÃÇÐèÒªÓõ½ÒÔϵÄ×é:
IIS_WPG ×飨Ҳ³ÆΪ IIS ¹¤×÷½ø³Ì×飬IIS Worker Process Group£©
Guests×é £¨À´±ö×飬ÔÚϵͳÖÐÓµÓÐ×îÉÙµÄȨÏÞ£©
ÒÔ¼°ÒÔϵÄÕʺÅ:
Internet À´±öÕÊ»§ £¨ÄäÃû·ÃÎÊ Internet ÐÅÏ¢·þÎñµÄÄÚÖÃÕÊ»§£©
Æô¶¯ IIS ½ø³ÌÕÊ»§ £¨ÓÃÓ ......

ASP.NETÉèÖÃÊý¾Ý¸ñʽÓëString.FormatʹÓÃ×ܽá(2)

{0:d} YY-MM-DD
{0:p} °Ù·Ö±È00.00%
{0:N2} 12.68
{0:N0} 13
{0:c2} $12.68
{0:d}  3/23/2003
{0:T}  12:00:00 AM
{0:ÄÐ;;Å®}
DataGrid-Êý¾Ý¸ñʽÉèÖñí´ïʽ
Êý¾Ý¸ñʽÉèÖñí´ïʽ
.NET Framework ¸ñʽÉèÖñí´ïʽ£¬ËüÔÚÊý¾ÝÏÔʾÔÚÁÐÖÐ֮ǰÏÈÓ¦ÓÃÓÚÊý¾Ý¡£´Ë±í´ïʽÓÉ¿ÉÑ¡¾²Ì¬Îı¾ºÍÓÃÒÔϸñʽ± ......

Ò»ÐдúÂë½â¾öASP.netÏÂÒ³Ãæ¼ä´«ÖµRequest³öÏÖÂÒÂëÎÊÌâ

ÄãÖ»ÒªÔÚWeb,configÎļþµÄ system.web ÅäÖýÚÏÂÌí¼ÓÒÔÏÂÅäÖãº
<globalization requestEncoding="GB2312" responseEncoding="GB2312"/>
µ±È»£¬ÄãÒ²¿ÉÒÔ½«“GB2312”¸ÄΪϵͳĬÈϵēUTF-8”£¬Ö»Òª¼ÓÉÏÕâÒ»ÅäÖã¬Ò³Ãæ¼ä´«ÖµµÄÂÒÂëÎÊÌâ¾Í½â¾öÁË¡£ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ